views:

827

answers:

1

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"&gt;

On others I find :

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

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!

Thanks for helping me out

+3  A: 

The XHTML MP 1.2 DTD is the current recommendation, finalized in March 2008.

Source:

http://en.wikipedia.org/wiki/XHTML_Mobile_Profile

Sarfraz
is that the case for iphone + HTC + other phones with modern mobile browsers? Or is it for WAP-websites?
Jorre
@Jorre: These details can be found on the wikipedia article i posted in my answer.
Sarfraz
@Sarfraz, thanks for the reply. The wikipedia document doesn't really say for what kind of phones this doctype can be used. Is this also useful for modern phones and mobile browsers like iphone, htc, ... or only for older WAP phones?
Jorre
@Jorre: yes it is suitblae for modern mobile too, thanks :)
Sarfraz
I get the following error when validating on validator.w3.org/mobile. Still unsure what doctype I should use? The detected DOCTYPE Declaration "<!DOCTYPE html PUBLIC "-//WAPFORUM//DTD XHTML Mobile 1.2//EN" "http://www.openmobilealliance.org/tech/DTD/xhtml-mobile12.dtd">" has been suppressed and the DOCTYPE for "XHTML Basic 1.1" inserted instead, but even if no errors are shown below the document will not be Valid until you update it to reflect this new DOCTYPE.
Jorre
@Jorre: not sure why you get that error looks like some configuration value mis-match.
Sarfraz
so to round things up here: WAPFORUM//DTD XHTML Mobile 1.2 is the correct doctype to use for mobile websites in 2010?
Jorre
@Joree: that is what i think
Sarfraz