Webmasters

Web Authoring Statistics: Page headers

The <html> element

The html element's popular attributes:

xmlns, lang, xml:lange, dir, and lots of xmlns:foo attributes.

The most-used attribute on html elements is xmlns, from misguided people using XHTML but sending it as text/html. They even (just) outnumber the people who specify the lang attribute!

A whole slew of people are specifying the xml:lang attribute, which will have absolutely no effect (no HTML processor will look at that attribute; it's an XML attribute). And finally, the fourth most-used attribute on the html element is the dir attribute (used by people who write in languages written right-to-left to make the text render in the right way).

All the other attributes used on html are invalid. Most (all?) of the xmlns:foo attributes are artefacts of Microsoft Office's creative "HTML" output, and the id attribute — not legal on the html element in HTML4! — was used by people to allow user stylesheets to target their sites. (This is now redundant since newer Web browsers give users that kind of control themselves.)

The <head> element

The head element is the most popular, apparently. Do people specify any attributes on it?

profile.

Short answer: not very often! It turns out that a tiny but measurable number of people do use the profile attribute, though. The three most-often used values are http://gmpg.org/xfn/1, http://dublincore.org/documents/dcq-html/, and http://gmpg.org/xfn/11. This makes XFN the most popular HTML metadata profile!

The other values of profile we found in the sample data were all below the threshold of significance, but for some reason a large number of sites seem to have one or two pages with profile attributes that point at themselves.

The <title> element

The title element is pretty boring:

lang.

Only one attribute is used on the title element often enough to appear on the radar, and that's the quite legitimate lang attribute.

We can't even really say anything about bad markup; the title element is the one element that is absolutely required on every HTML page, and indeed, it seems the overwhelming majority of pages specify it.

Authentication required

You need to be signed in with Google+ to do that.

Signing you in...

Google Developers needs your permission to do that.