Flag of Sweden
Andreas Rejbrand’s Website

Web design: Standards compliance

Yesterday I wrote about the improved markup on my sites. Although I didn’t mention it explicitly, it almost goes without saying that almost all my webpages are now conforming to the W3C HTML and CSS3 specifications. Although I think in terms of HTML5 and use the HTML5 semantics in most cases, the doctype is still XHTML 1.0 Strict. Now, on one single page, I do actually use the HTML5 <video> tag. Of course, this makes that page a non-conforming XHTML 1.0 Strict document, but in practice there is no problem at all: every HTML5-aware browser I know of will display the video just fine, as if the doctype was the HTML5 one. I will soon upgrade to the HTML5 doctype, and then 100 % of my webpages will be standards-compliant.

It is somewhat interesting to examine the standard compliance of external major websites. It turns out that many, if not most, actually are non-conforming. Here are a few examples:

Website Doctype HTML status CSS status
rejbrand.se XHTML 1.0 Strict Valid Valid
svt.se HTML5 Invalid (not far from valid) Invalid
datormagazin.se HTML 4.01 Transitional Invalid Invalid
bbc.co.uk XHTML + RDFa Valid Invalid
microsoft.com HTML5 Invalid Invalid
apple.com HTML5 Invalid (not far from valid) Invalid
adlibris.se HTML5 Invalid Invalid
google.com HTML5 Invalid Invalid
w3.org XHTML 1.0 Strict Valid Valid

In most cases, I have examined only the main page of the site. I suppose most big sites use frameworks making each page comparable to each other page in terms of overall markup and page layout.


Show all news items.

Only show the most recent news items.