Front-End Quiz Part 7, Doctypes


Which HTML doctype is best?

  1. HTML 3 or lower, or just don't use a doctype.

    \*Shudder\* With an ancient or missing doctype, your web page will be rendered in quirks mode, making proper CSS design more buggy and difficult.

  2. HTML 4.01

    My personal choice. As of 2007, HTML is still a perfectly current, valid standard, and is extremely well-supported and well-understood on the web.

  3. XHTML 1.0 or 1.1

    There are actually some problems with XHTML. As of 2007, try to serve true XHTML, and your website will probably fail for lack of visitors, simply because Internet Explorer (IE) currently doesn't support it. Many sites these days claim to be built in XHTML, but most fail the validator, and almost all are served as text/html to support IE, causing them to be understood by all browsers as nothing more than syntactically weird-looking HTML. In other words, it is HTML in all but name. As a best case scenario, let's assume that on September 2008 IE 8 will ship with true XHTML support. That means XHTML won't be a feasible option for websites until the last users of Internet Explorer 7 (released 2006) finally upgrade. In other words, extremely optimistically, it will be, say, 2010 or later before true XHTML is a viable option. Until then, why fake it? All of that said, there are some good reasons to use today's faux brand of XHTML. Most commonly, content might need to be treated as XML on the server-side, even if it's served as text/html to the client. This is where I think XHTML shines today.


Comments:

Post a Comment:
Comments are closed for this entry.
About

My name is Greg Reimer and I'm a web technologist for the Sun.COM web design team.

Search

Categories
Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today