4 replies [Last post]
seb
Offline
Enthusiast
Last seen: 7 years 12 weeks ago
Joined: 2003-09-20
Posts: 208
Points: 0

I want to add some semantic markup to the following text to make it easier to style in the future:

Tel: 01000 000 000
Fax: 01000 000 001
E-mail:

Some of you may suggest shoving a <span> around "Tel:", "Fax:" etc, but I was wondering if it'd be appropriate use of the <label> tag.

or can label ONLY be used when referencing a form element?

Charlie
Charlie's picture
Offline
Regular
Last seen: 10 years 26 weeks ago
Joined: 2003-10-15
Posts: 16
Points: 0

&lt;label&gt; tag as non-form-related semantic markup?

Seb,

I would define semantic markup as using the correct elements for their correct purpose only, therefore it would be inappropriate to use the label tag.

How suitable would the <address> element be for your situation?

thepineapplehead
thepineapplehead's picture
Offline
Guru
Milton Keynes
Last seen: 14 weeks 6 days ago
Milton Keynes
Joined: 2004-06-30
Posts: 9668
Points: 801

&lt;label&gt; tag as non-form-related semantic markup?

Ooooh, the address tag! Haven't seen that used in a long time!

Definitely go with address - very cool and unknown tag.

Verschwindende wrote:
  • CSS doesn't make pies

seb
Offline
Enthusiast
Last seen: 7 years 12 weeks ago
Joined: 2003-09-20
Posts: 208
Points: 0

&lt;label&gt; tag as non-form-related semantic markup?

well it's not an address. I'm looking for something to put around the three "titles" so that I can style them differently from the data. If this was in a table they'd be <th> and the data <td>, etc. But they're not in a table.

seb
Offline
Enthusiast
Last seen: 7 years 12 weeks ago
Joined: 2003-09-20
Posts: 208
Points: 0

&lt;label&gt; tag as non-form-related semantic markup?

Maybe I should be using:

<dl>
    <dt>Tel:</dt>    <dd>01000 000 000</dd>
    <dt>Fax:</dt>    <dd>01000 000 000</dd>
    <dt>Email:</dt>  <dd>dot@dotat.at</dd>
</dl>