GregHowley.com

Stepchildren of HTML

July 23, 2008 -

I've been doing a lot more thinking about web design recently. I'm designing three new sites, tweaking a lot of my existing ones, and I've even subscribed to the Boagworld podcast. And although I tend to focus most of my thought on css, php, and sometimes javascript, there are actually still some things to learn about plain old HTML.

HTML hasn't changed in a long time, and these are mostly things I've known about for years, but I recently gave myself a refresher on a number of tags and attributes that seem fairly obscure, or that I don't use at all. I thought I'd share.

The <blockquote> tag - I use the blockquote tag all the time. Any time I quote stuff on this site, you generally see the indented and framed text, in a different font, with the quotation mark watermark. I do all this by formatting my blockquote tag with css. It works well. The blockquote tag has a cite attribute for citing the source of your quote, so long as you've got the url. I use that a lot too.

The <q> tag - Nobody really uses the q tag, because it's not supported well by Internet Explorer. It's essentially an inline method for quoting shorter text snippets. And while there are a number of articles about how to use the q tag properly by implementing some css hacks, it just doesn't seem worth it.

The <acronym> tag - Like its cousin the <abbr> tag, <acronym> doesn't see much use. While this is understandable for <abbr>, since it's not supported in Internet Explorer, <acronym> is a good tag. I mainly use it to explain acronyms that might be unclear, (RTFM) but it can also be useful just to provide tooltips. I've prettied my acronym tags up with CSS so that the cursor changes to a question mark when you hover over one.

The <sub> and <sup> tags - for subscript and superscript. Useful sometimes. I thought I'd add them to this list since they never see much use.

The <strong> and <em> tags - Yes, there's really no difference between <strong> and <b> and there's no difference between <em> and <i>. But where <b> and <i> are presentational tags, indicating bold and italic text, <em> and <strong> are structural tags, indicating emphasis and strong emphasis. Since I'm into semantics, I tend to use <em> and <strong> more often than not.

Definition Lists - Here, I'm talking about <dl>, <dt>, and <dd>. Definition lists are similar to ordered and unordered lists, but each grouping contains a term and a definition. If you look at my resources page and view the source, you'll see that I use nested definition lists to present the different downloadable utilities. The definition list can be very useful at times.

The <address> tag - This is actually not for postal addresses. According to the W3C, the address tag is supposed to be used to supply contact information for a document or for part of a document. I've never really seen it used, so it's odd to see that it exists. Essentially, the <address> tag is the platypus of the HTML world. Or maybe a capybara.

The <label> tag - As opposed to the <address> tag, <label> seems kind of useful. Maybe you knew about it, but if I used to know, then I forgot. In essence it's a label to go along with a HTML form control. When you click the label text, it's like clicking the control. W3 Schools has a good example of the label tag in use. Nifty.

For anyone reading who's interested in xhtml, I wrote an article a few years back called XHTML in a Nutshell. It's fairly short, and a good start if you're interested in coding in HTML's parse-friendly cousin.

Comments on Stepchildren of HTML
 
Comment Wed, July 23 - 7:19 PM by tagger
I agree you don't see the tags much, but consider this:

In UNIX (OK, OK, now everybody is using Linux and GUIs), we often had to grep and awk and tcl files to pull out stuff we wanted to pull out. If a policy were put in place, and enforced, to use to identify the contact information for the author of a document, a simple grep statement could build a list of names, etc. from a pile of files.

Remember, when HTML was devised no one had ever heard of Java(script), PHP, XML or any of that other stuff.

Old Farts used . . . UNIX.