HTML5 Tags – Raise your hand if you are confused?
How to Confuse a Developer 101
As you may know, I am building an HTML5/Wordpress theme using the HTML5 Boilerplate. I have no problems with it at all. What I do have problems with, is trying to figure out what tag to use, and where to use it. I’ve talked about this before, with the ‘nav’ and ‘address’ tags. That was before I actually tried to build anything using the new HTML5 tags. Now that I am trying to use them, I find myself questioning if I am using the right tag!
HTML4 (whatever . version we are on) is not complicated. Wrap text blocks in ‘p’ tags. Links get wrapped in ‘a’ tags, and so on. All of which is easy to understand. There are no ‘ifs’ or ‘sometimes’ involved. After reading through some of the definitions for these new tags, I get the feeling that the interpretation of when to use them can be subjective.
You want to know how to confuse the hell out of all of us? Easy as pie. CHANGE THE TAG DEFINITIONS AS WE GO!
ASIDE From that, everything makes sense….oh wait, no it doesn’t
Let’s take a quick look at the ‘aside’ tag, a new HTML5 tag, that I am/was struggling with. Here is the definition PRIOR to the change, which if you are NOT careful when you are using Google to search, you might still get:
The aside element represents a section of a page that consists of content that is tangentially related to the content around the aside element, and which could be considered separate from that content. Such sections are often represented as sidebars in printed typography.
Just from the word itself, ‘aside’ brings to mind a ‘sidebar’, but through yet more reading I found that is not the case at all. It is more of a blockquote thing. Content that is related to the article it is in, but can stand alone by itself is what should be in the ‘aside’ tags. At least that WAS the definition. After some people bitched, apparently the spec writers listened and changed it. Thank God for this guy’s article.
I found the new definition in that article, (authored by Mike Robinson), saying “hey, remember when we said this doesn’t mean ‘sidebar’? Nah, go ahead and do that.”
New definition for the ‘aside’ tag”
When used within an article element, the contents should be specifically related to that article (e.g., a glossary). When used outside of an article element, the contents should be related to the site (e.g., a blogroll, groups of additional navigation, and even advertising if that content is related to the page).
MUCH clearer now. You just have to pay attention to where you are putting it. If it is in an ‘article’ tag, then it must relate to the content of that article. If not, then it must be related to the site. Honestly, I can’t think of a time when something isn’t related to the site. Maybe just random links? If you know, let ME know.
HTML5 sounds awesome, but is it ready?
This has been discussed in plenty of articles, but I only remember seeing arguments against it because of browsers that don’t support it. Now that I am trying to build with it, it brings me to another point that I’ll have to go and search for, to see what others are really saying about it.
Is HTML5 even ready? Forget the browser issues. That part is obvious and has some work arounds. The real problem I see is that the tag definitions are NOT written in stone yet. The fact that a tag’s definition can change on the fly could mean wide spread misuse. I’ve already talked about how the nav and address tags can be hard to get a hold of. I’ve worked with it now for about 3 hours trying to use a bunch of new tags for semantics, and I am getting horribly confused.
I am not saying HTML5 is horrid. I will admit, that my article before was a bit premature. I am indeed digging it. Well, some of it. I just am not sure that it is ready to be used. Of course I’m not saying don’t, and certainly don’t wait till that silly 2022 year thing, which apparently has been misquoted according to this. But I want the definitions to be fairly stable.
Ok…I like HTML5. I like what it is trying to do. I am still worried about wide spread misuse of some tags, and I think my nav/address article still holds on that. My current and future projects will now incorporate the new tags, mainly so that I can learn them. I just don’t want to be called out on interpreting the definitions wrong.
What are your thoughts on HTML5 usage? Let’s hear some comments!