I need to redesign the old site and was thinking what would be the best Web markup language to use. Here are my two questions. Please help me to find the right answer to both or any of them:
-
What’s the optimal Web standard for desktop users? HTML? XHTML? Anything else? What version of it (e.g. “XHTML 1.0 Transitional”)?
-
What is the optimal markup language for mobile users? The site I’m going to redesign is about applications for mobile devices. So, naturally I have a lot of mobile visitors. Most of the devices are Android-based, iOS-based as well as some BlackBerries, Palm OS and Symbian devices. Which markup language should I stick to when I’ll be developing mobile version of the site?
Thanks as always for the great answers!
I would avoid XHTML. XHTML has become a dead end and is in no way “better” or “stricter” than HTML, plus IE still doesn’t support it properly. See for example: http://www.webdevout.net/articles/beware-of-xhtml
The best supported standard currently is HTML 4.01 Strict.
There is no need for transitional for a newly created site.
You could use “backwards compatible HTML5”, thus 4.01 markup with the HTML5 DOCTYPE, in order to be ready if you want to use HTML5 features some time. Be careful with HTML5 elements, because IE doesn’t support them (or even fall back properly), unless you use a JavaScript work-around.
The HTML5 DOCTYPE is
<!DOCTYPE html>. HTML5 comes in two syntax flavors, the “HTML/SGML like” kind and the “XHTML/XML” kind (called “XHTML5”). Both kinds use the same DOCTYPE, but it is theoretically optional for the “XHTML” syntax, which however will have browsers render in quicks mode, which should be avoided. The browser distinguishes between the two by the MIME type of the document, which MUST beapplication/xhtml+xmlfor XHTML5. But IE doesn’t support that MIME type, so you not use XHTML5.New CSS3 features shouldn’t make any problems, if you use it in a way, so that the site doesn’t become unusable when not applied.
There is no need for any special markup for mobile browsers as they all support HTML 4.01 quite fine. Look into CSS Media Queries to display the content differently for mobile browsers.
Depending on the amount of content, it however may make sense to create a separate site for mobile browsers without any content that mobile browsers doesn’t need, so it doesn’t need to be downloaded, such as Flash. But (again) there is no need for any “special” HTML for mobile browsers.