The right sorts of tools for the right sorts of jobs

Right, so we all know that for a block of text, you put it in a <p>. That’s not really the problem here: the problem is the other things, the possible grey areas and the borderline. None of this is new, none of this is revolutionary, I suppose this is just a musing on what is the most logical structure for a certain type of data.

To be or not to be

A quote goes into an element called a <blockquote>. If it is a single-liner, something in a block of text that does not have the importance of its own line, the <q> is used.

‘Colon’ies

As a fairly vague general rule, if you have just used a colon, think very hard about whether you’ve just used that colon properly, in the English sense of the punctuation. Too often, a colon is used in instances like this:

Name: James
Occupation: Web Developer
Email: james@webdevelopment.org

This sort of paired-values works much better as a definition list, as it lists definition terms and their respective descriptions:

<dl>
    <dt>Name</dt>
    <dd>James</dd>
    <dt>Occupation</dt>
    <dd>Web Developer</dd>
    <dt>Email</dt>
    <dd>james@webdevelopment.org</dd>
</dl>

Often, many tables are better represented as definition lists. Not because it’s technically more semantic, but because the simpler style of structure to the definition list makes it more efficient when paired with aural narration, and the robustness of tabular data is not necessary for simple paired-values.

<h3> abuse

This one is probably the most difficult to control, in my opinion, especially with dynamically-loaded content, CMS-driven content, and the biggest worry: client-updated content. I had a conversation today, which I thought had valid arguments both for and against. The argument went something like this (by the way, watch the spiffy usage of definition lists to denote dialogue):

Him
Shouldn’t I use a <h2>?
Me
No, you’re using it because you want the words to be bigger and more prominent, not because it’s a sub-section of the content under the general, parent header.
Him
But technically the error is a subsection of the parent header, because the error is generated from that set of pages.
Me
But the error itself has nothing to do with the content—in fact, it states that the content could not be found, so isn’t part of the content at all.

It made sense, in a way. Sometimes, it seems like everything should be divided into little portions because it’s the most systematic way. But is the most systematic the most semantic?

Sometimes, I’ve found, no. This, unfortunately, cannot be pinned down so easily: each content may or may not have an instance where a sub-heading needs to be in place, others may need a restructuring of the content itself to make more sense … structurally. That sort of thing should be handled at the Information Architecture level (because, let’s face it, it isn’t a front-side web developer’s job to know it) but often, it just isn’t. Which is why everyone needs to be on a look-out for things that structurally don’t make sense.

Tidy up

Of course, these things come with time. The way to look at something and figure out all the combinations, permutations (changing content, changing structure, changing emphasis, etc.) and then, only then, be able to pick the one that makes the most sense, logically. Because that one’s the most semantic. And semantic is The right sorts of tools for the right sorts of jobs.

This entry was posted in techthings and tagged . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *