Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

what doctype should I use for a mobile website?

Tags:

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!

like image 226
Jorre Avatar asked Feb 13 '10 13:02

Jorre


People also ask

Which DOCTYPE is correct for?

Correct Option: Ddoctype html>, doctype is the very first thing to write in HTML5.

Is typing DOCTYPE HTML necessary?

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.

What is correct DOCTYPE for an HTML version 5 file?

doctype html> or <!HTML5 doctype does not reference to a DTD. This is because, html5 is a SGML based, unlike HTML4.

Does XHTML require a DOCTYPE?

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.


2 Answers

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

Source:

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

like image 50
Sarfraz Avatar answered Nov 03 '22 12:11

Sarfraz


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

like image 43
jimmystormig Avatar answered Nov 03 '22 11:11

jimmystormig