質問

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?

役に立ちましたか?

解決

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.

他のヒント

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).

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top