Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Getting eclipse to highlight and validate HTML files

Tags:

html

eclipse

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 - an exact opposite of desired behavior.

like image 766
ikaushan Avatar asked Jun 20 '11 03:06

ikaushan


People also ask

How do I view HTML files in eclipse?

If you want to always use the HTML editor to open HTML files then go to the Eclipse preferences -> General -> Editors -> File Associations. Select the extension up top (e.g. *. htm, *. html) then select the HTML editor in the bottom pane and press the Default button.

Can you use HTML on Eclipse?

Eclipse HTML Editor is an Eclipse plugin for HTML , JSP , and XML editing and has the following features: HTML , JSP , XML , CSS , DTD , and JavaScript colored highlighting.


3 Answers

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.

like image 20
Nathan Avatar answered Sep 29 '22 05:09

Nathan


It is likely that you do not have an HTML editor plugin in Eclipse.

You can download the Web Tools Platform plugin which has a decent HTML editor.

like image 198
Rahul Avatar answered Sep 29 '22 06:09

Rahul


You need the Colorer plugin for Eclipse.

like image 21
BZ1 Avatar answered Sep 29 '22 05:09

BZ1