When the Template is Broken

Written By: Timothy Fish Published: 7/7/2009

One of the fundamental tenets of HTML/CSS is that the content of a document should be separate from the formatting of the document. Sometimes that is easier said than done. It isn’t that we disagree with it, but in our haste, we might choose to ignore it. This can create problems, but we do it anyway.

Let me give you an example. Suppose you have a blog and you’re using someone else’s template. Sure, it looks exactly like everyone else’s, but you don’t really care. All you want is something that works and allows you to write posts. Your first few posts go fine and then you get to a longer post. You decide to break it up with heading and sub-headings. You encase the first heading with <h1></h1>, but when you look at the result, the text is now larger than the title for the post. Maybe you look at the title and it is shown in <h3></h3> tags. The easy thing to do is to just move on to <h4></h4> and let it be, but that isn’t the best thing to do.

The best thing to do would be to got figure out what needs to be done to the template to make it work properly. Ideally, we would like for the title to have its own style and the headings to be progressively smaller than the title. It’s debatable whether the title should be <h1></h1> or whether the first heading after the title should be, but it should be such that when we write a blog, we don’t start with <h3></h3> or <h4></h4>. If we did that, we would run out of headings very quickly. So, if you find a problem with a template, go fix the template, don’t just use a “smaller” heading.



www.timothyfish.com