Enable HTML5 tags on Eclipse

12

3

I really love Eclipse (PDT)... But i'm developing sites using HTML5 and CSS3 and it mark the HTML5 tags like <nav>, <section> and <article> as invalid tags (inexistent).

How can I add those new tags to it?

And what about CSS3 rules?

I read something about remove the "invalid tag" check... and that's not what I want. :(

Thiago Belem

Posted 2010-05-19T15:56:30.407

Reputation: 529

What version of Eclipse you are using ? – ukanth – 2010-05-19T16:42:23.137

Eclipse Galileo build 20100218-0602 for Windows and Eclipse Galileo build 20100218-1602 (v1.2.2.20100216-1730) for Linux. – Thiago Belem – 2010-05-19T17:01:55.197

Answers

4

Not much info is available in the Zend site as regarding HTML5, so it's unclear whether they truly support it.

From examining the Zend Framework source file Doctype.php, it seems that the DOCTYPE should be declared as simply <!DOCTYPE html> in order to support HTML5, which is the correct format according to the HTML5 specification.

The error might also come from an HTML validator that you have installed.
In this case, you might be able to adjust its preferences.

I also hope that you have installed the latest Eclipse PHP Development Tools.

harrymc

Posted 2010-05-19T15:56:30.407

Reputation: 306 093

I'm having the same issue as @DeanRather. – Robert Strauch – 2014-11-01T21:37:21.853

@harrymc - I'm using the PDT... As I said in the question.. The only thing I can do about it is disable the "invalid tag" error.. And that's not correct. – Thiago Belem – 2010-05-25T10:23:03.120

@TiuTalk: What about my other points - doctype and html validator? – harrymc – 2010-05-25T10:52:50.257

<!DOCTYPE html> did it for me! Thanks. – Ahmed Akhtar – 2018-10-05T06:02:34.447

1I'm having the same issue. Using a fresh eclipse PTD I just downloaded then -- up to date and no custom validators or anything installed. In my index file I've got <!DOCTYPE html> but the 'view' file with the html5 tags still throw warnings. – Dean Rather – 2011-05-25T10:12:38.620