After years of creating HTML documents and trying to keep abreast of different markup patterns and best practices that make the markup the most meaningful I'm often left wondering how these semantics will start paying off for end-users.
Let's introduce the question as: You have two documents…
The first document uses all of the most reasonably standardized parts of contemporary HTML to create a rich document structure peppered with some RDFa and choice microfromats for an exemplary expressive piece of HTML.
The second document is the same structure as the first except that the tags have all been converted to divs and spans and all of the classnames are purely stylehooks: all semantics have been removed but the page renders efficiently and visually identical to the first.
I'm interested in the direct benefits of the first document over the second document to a well-sighted human who is interacting with this HTML document via a desktop or mobile browser. Your answer can invent the nature of the content and point at specific browser features to demonstrate your point.
Your answer should not include:
(This is, of course, not complete. It's just what came to my mind while typing.)
This answer assumes: for users of desktop/mobile browsers without a screenreader; page consists of div
and span
elements only (with allowed attributes); only what is relevant today (not tomorrow, not in 2400 years).
icon
link type; unless you place an ICO img in root) nor a title (title
element) when bookmarking your pageapple-touch-icon
, msapplication-TileImage
, …)alternate
link type)prefetch
, prerender
, dns-prefetch
, pingback
, prev
/next
, …(Note that some of this could be accomplished with HTTP headers.)
Without a
, input
, textarea
, button
etc. the corresponding functionalites would require JavaScript. Users without JavaScript couldn't click at links, search, upload files, submit forms, …
Reasons for no (or limited) JS support:
Also some typical navigation mechanisms might no be available by default (tabbing through fields; focus; pressing enter to activate; search in link text (e.g. '
in Firefox)).
There are various browser add-ons (or bookmarklets, etc.) that parse the markup and "do things".
h1
-h6
) (e.g. Table of Contents)table
) (e.g. table calculator, …)Without CSS support, a page consisting of only div
and span
elements may be hard to read, or it could even become unintelligible (think of complex data tables, for example).
Reasons for no (or limited) CSS support: