Posted under HTML
Permalink
Tags Doctype, Facelets, Gotcha, HTML, JSF, Tip, Web, XHTML
This follows on from my previous post which highlighted an example of a valid DOCTYPE which still threw IE into Quirks mode.
The DOCTYPE issue has been something of a minefield – there are a number of different declarations and they are relatively complex, some have browser compatibility issues, and then of course different ones are needed for XHTML/facelets use.
It seems the holy grail of simplifying all of this is just to stick to the remarkably simple and highly compatible HTML5 DOCTYPE:-
<!DOCTYPE html>
- This has the following highly desirable characteristics:-
- It triggers standards mode for all known modern browsers
- It is backwards compatible
- It works with HTML pages and facelets/XHTML
See these posts here, here and here for more discussion on this.
It really does seem to solve all the DOCTYPE pain – I think I’ve died and gone to heaven!
Leave a Reply
You must be logged in to post a comment.