hardcore html

When I started writing about html I decided to start with the very basics. Write a few posts about simple things most people already know, refresh their memory. After all, the basics are very important. It seems my first articles still weren't basic enough. Recent discussions about html5 brought up some very interesting reactions where people displayed some uncanny negligence of the most basic function of html, and made me delve even deeper in the god ridden dungeons of the html core.

html is the ground plan of a web document

Mark me down

I'm not going to single out specific quotes, but from the reactions I've read many people seem to think of html as a mere excuse for css, javascript and other languages that help build a web page. Its function is reduced to being a simple hook for other languages. According to some, further specifying container elements decreases flexibility. Having everything defined as just a container is apparently handier when applying css or javascript to a document. I don't really see how this kind of reasoning works, but those are ideas that exist out there.

Mark me up

html brings structure and meaning. That's what html is for. Publish content on the web and describe and structure that content. In its purest form, it has very little to do with css and javascript, which are just additions for certain clients. html is there to add meaning and context to the elements of a web document.

Most html tags we know today have much to do with adding semantic value to content. We try to define the content we include in a document in such a way that makes it readable for machines and humans alike. For people with good vision, this is not too hard as our vision naturally creates a context for content. But for machines and visually impaired users, it's good to give elements within a document a certain semantic value. They have to be told what a certain element represents.

Mark me up, future style

The future of html seems to bring us two kinds of improvements. For one, there will be more semantic elements added to the specification. This means we can define content in our document as a header, a footer, a section, an article, ... instead of just calling it a container with paragraphs, text and other elements within. Our vocabulary will expand and thus machines and visually impaired users will have a better way of understanding our published content. Which is nice.

But more importantly, not only will we have more semantic elements, there will be new elements defining its relationship to other elements. A <header> tag is not just a semantic element, it's an element that represents a certain relation to the primary content. It precedes this content, giving us important information and context to better interpret the given content. Same goes for the <aside> tag, which tells us the contained content is related to the primary content, but not part of it. This all helps in defining which part of an element is the main content, what content is related to it and how it is related to it.

Put on your html glasses

When looking at the improvements of the html specification, put on your html glasses. Think of what html is supposed to do. Don't start by thinking about javascript or css, but think about the way you can best structure a document, as to make sure the content has an optimal readability for humans and machines alike. Think about how this can be improved. An see how the new additions reflect those improvements.