Getting eclipse to highlight and validate HTML files

后端 未结 4 1241
囚心锁ツ
囚心锁ツ 2021-01-07 22:23

How can I configure Eclipse to properly syntax highlight and validate HTML files?

At the moment, Eclipse simply offers spelling suggestions for tags and attributes -

4条回答
  •  情书的邮戳
    2021-01-07 23:11

    I found this to be a difficult thing to figure out. I already had an HTML editor installed as part of Eclipse, but it wasn't getting loaded.

    Go to Preferences > General > Editors > File Association and click on *.html (and do the same for *.htm). If you have an HTML editor installed, you should see it in the list. Just click it and then click Default to make Eclipse open HTML files using the HTML editor.

    If you don't have an HTML editor installed, WTP is fine, per Rahul's suggestion. You may then need to do the above steps to make sure the HTML Editor is chosen when you edit an HTML file.

提交回复
热议问题