Must Use Correct Markup....

Posted on 26 April 2003 in Internet, Web Development (No comments)

I'm currently redesigning my main site, Planet Bods. It's current design dates back to September 2001, and the code is showing it's age.

One of the biggest changes to the site, besides a new design, will be behind the scenes - the HTML itself is changing to make it leaner and meaner, and more logical.

By using sensible code to markup your page, you get code which is then easier to understand for those viewing your site in an older browser, a text only browser or a screen reader. If something is a heading, use a heading tag. If something is a list, use a list tag.

I've been doing that for a while, but I decided this time to start from the very beginning.

Simple and straightforward?

This in itself is easier said than done. Navigation, headings and bullets are all easy, but how on earth do you mark up a script in HTML?

When I talk about scripts, I'm not talking about JavaScript, Perl or some other computer script. I'm talking the kind of script you get in TV, radio or the theatre.

Why is this difficult? Well HTML is actually a markup language designed for big fat, structured documentations. It's had revisions and extensions in the past, but it's roots show. Marking up a script to tell Chris Barrie and Craig Charles what to do in an episode of Red Dwarf was not what people had in mind when it was created.

The solution!

What to use? After much umming and arring, I finally decided what a script is in HTML. HTML offers a DL (definition list) which according to the W3C HTML4.01 spec:

"...generally consist of a series of term/definition pairs (although definition lists may have other applications)."

The name of the character saying something is therefore a DT (definition title) and the line itself is a DD (definition description).

That only left the matter of what a bit of descriptive text in the script was. In the end, I decided that this should just be a P (paragraph).

Sorted. A structured markup fit for a structured document!

< previous | top ^ | next >

Share this page on

Have your say

Sorry but comments on this post are closed, but you can still email me.

Cookies Policy | Contact Us