Question

If I make the doctype as:

<!DOCTYPE html PUBLIC "-//WAPFORUM//DTD XHTML Mobile 1.0//EN" "http://www.wapforum.org/DTD/xhtml-mobile10.dtd">

Can the page also use HTML5 features?

Was it helpful?

Solution

The documentation about the DOCTYPE indicates that

Authors should not use obsolete permitted DOCTYPEs, as they are unnecessarily long

so while it does say you can use it, it also says you shouldn't.

That being said, in my experience modern browsers don't seem to care much about the doctype (even if you omit it). You should still be able to use any HTML5 "features" with them including new semantic tags, new JS additions, etc., but just note that it is not advisable.

OTHER TIPS

According to the HTML5 specification, you can add some additional information into DOCTYPE: http://www.w3.org/TR/html51/syntax.html#the-doctype

Optionally, a DOCTYPE legacy string or an obsolete permitted DOCTYPE string (defined below).

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top