I work for a company who's primary clients still use Internet Explorer 7 (NHS etc).
In our code we generate snippets of HTML in various places and Eclipse is generating lots of warnings relating to markup that is obsolete in HTML5.
I know that setting a valid doctype of HTML4 fixes the problem on flat html files but as we build the code over several PHP files we can't set a doctype in the snippets.
Is there a way to change the 'default' doctype to HTML4 globally or by project as I do not want to turn off the warnings as that may cause me to miss actual issues.
Drove me nuts too until I found the answer...
http://www.eclipse.org/forums/index.php/t/219788/
Steps:
{your_workspace}/{your_project}/.settings/org.eclipse.wst.html.core.prefs
with a text editor.document-type/{your_file_name}=...
by document-type/<project>=...
(do not modify <project>
, paste it as-is)