I'm creating a mobile version of my website from scratch, but I'm unsure what doctype I should use. There does not seem to be a clear standard is that true?
On many mobile sites I see :
<!DOCTYPE html PUBLIC "-//WAPFORUM//DTD XHTML Mobile 1.2//EN" "http://www.openmobilealliance.org/tech/DTD/xhtml-mobile12.dtd">
On others I find :
<!DOCTYPE html PUBLIC "-//WAPFORUM//DTD XHTML Mobile 1.0//EN" "http://www.wapforum.org/DTD/xhtml-mobile10.dtd">
Can somebody point me in the right direction for decent mobile web design?
I'd like to support most modern handhelds like iphone and HTC devices
I guess a good resolution to use is 320*480 max!
Correct Option: Ddoctype html>, doctype is the very first thing to write in HTML5.
All HTML need to have a DOCTYPE declared. The DOCTYPE is not actually an element or HTML tag. It lets the browser know how the document should be interpreted, by indicating what version or standard of HTML (or other markup language) is being used.
doctype html> or <!HTML5 doctype does not reference to a DTD. This is because, html5 is a SGML based, unlike HTML4.
Even though a doctype may look a bit strange, it is required by the HTML and XHTML specifications. If you don't include one you will get a validation error when you check the syntax of your document with the W3C Markup validator or other tools that check HTML documents for errors.
The XHTML MP 1.2 DTD is the current recommendation, finalized in March 2008.
Source:
http://en.wikipedia.org/wiki/XHTML_Mobile_Profile
XHTML Basic 1.1 became a W3C Recommendation in July 2008, superseding XHTML-MP 1.2
Source:
http://en.wikipedia.org/wiki/XHTML_Mobile_Profile
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With