H3 HTML Tags are Right for Blog Posts

A few days ago, I was rambling about style and semantic HTML. It was a post mostly about tags, but toward the end I said this:

Reading through their tomb of standards, I realized I need to correct my headings on the blog too (I jump directly to tags instead of going by order, because the CSS for these tags looks better — in other words, I’ve been lazy by not fixing this), among potentially many other things. There are over a hundred semantic tags in HTML, and there’s a reason for each one.

“Their tomb of standards” refers to the HTML Living Standard, and they (among other sources) explain why sub-headings in posts should actually be

tags (the way I’ve done it so far). Pretty simple when you think about it.

  1. The main header of the entire website is (in my case, “The Art of Not Asking Why”).
  2. Blog post headings are (as in the heading of this post, above).
  3. Blog post sub-headings are , as I was doing it.

This is not just a style and organizational thing; this is also how web browsers are programmed to read web pages, and they expect one

pair.

You’d notice I didn’t use the word “title” above, because in HTML the is reserved for metadata in the head part of the page (defined by <head></head>). It’s there, and it serves a purpose — it’s basically your website’s name or the title of your entire web document (we need to remember, these things originated and were based back on what was printed on paper).

OK. I was wrong and order is restored. If I want to do sub-sub-headings, there’s

for that. But if I get to that level of breaking down my posts, I think it’s a good sign that I’ve been writing too much in one go and should consider a smaller post.

添加评论
点赞收藏
点踩分享查看原文
评论
?
参与讨论