tags and their usage

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
I was wanting to copy the text of a poem into my blog from Wikipedia here:
What with it being Welsh and with the indents and line breaks I just
opened the html source of the page and copied the tags and all and
pasted it in. It displays fine no probs but I was troubled by the tags I
had never come across. is very unclear on what these
tags are for, (both <dt> and <dd> seem to be the same thing, items in a
list) giving a strange example about coffees, so two questions:

I presume using these tags to format verse is just wrong and liable to
give unpredictable results?

What is the intended use of these three tags? Is there a better
explanation and examples somewhere?


Tim w

tags and their usage

2012-04-16 16:34, Tim W wrote:

Quoted text here. Click to load it

It is not properly written Welsh: it uses the ASCII apostrophe, instead
of the proper, curly punctuation apostrophe (which can be written as
&rsquo; in HTML if needed, or normally entered as such).

Quoted text here. Click to load it

Indentation might reflect the normal way of presenting the lyrics. I
wonder whether the use of italic is normal as well.

Quoted text here. Click to load it

The markup is odd inded.

Quoted text here. Click to load it

That is not the worst part of its bogosity. See
for an explanation.

Quoted text here. Click to load it

Nominally they mean "term being defined" and "definition for a term",
but in practice, they are just used for indentation, mostly in lists of
name/value pairs.

Quoted text here. Click to load it

It is grotesquely wrong if the elements are taken in their defined
meanings, but virtually nobody does that. The results are fairly

Quoted text here. Click to load it

You might check the HTML 4.01 specification, but browser vendors, search
engine vendors, and other relevant parties don't take it seriously in
issues like this, so why bother?

The markup is odd, but it does the job of indenting stuff. It would be
easier to use <blockquote>, for an entire block, but why bother?

Yucca, /

tags and their usage

On 16/04/2012 14:59, Jukka K. Korpela wrote:
Quoted text here. Click to load it

Thanks, I suspected as much.

So am I right to think that the default browser behaviour in the absence
of anything in the CSS would be just to indent? I can see that would be
a pretty useful tag. How would I know what a browser is going to do with
a tag?

Tim W

tags and their usage

Quoted text here. Click to load it


Mostly browsers don't much do anything but style various elements a
bit and mostly they use a default style sheet for this. And mostly
they use simple styles that are not up to the standard of some
sophisticated requirements.

They are certainly not so sophisticated that, for example, there is a
button to hear the term and then the definition and the voice intones
and pauses like a teacher explaining a term. You know how teachers go!
They say a term and pause and look at the class and all the young
faces suddenly pay attention (because they need to write the thing
down or remember it for a test) and then say, slowly and carefully,  -
remember, they are teaching about a possibly new term to the class -
the explanation. They know a term is being defined for them. With
browsers, fat chance! It is much more primitive in reality with
browsers. They are just insensitive robots.

Quoted text here. Click to load it

There is generally quite good consistency among browsers with most
elements, but it depends on how detailed you want the agreements to be.

There was an old idea once that no one seems to care about much. That
HTML had elements and that they had a meaning and were useful for more
than mere style. But I won't bother you with all that stuff.


tags and their usage

Quoted text here. Click to load it

Actually, the big problem is that people tend to think of HTML tags in
terms of formatting, rather than in terms of labelling types of data.
It helps to understand the history. Many moons ago, before the advent
of Personal Computers and WYSIWYG editors, the way one created a
manual was to write it on a mainframe in a plain text file using a
language called GML (General Markup Language) and later BookMaster (at
least in the IBM world). The marked up file would then be fed into a
Script processor (a compiler for text) which would produce a book
formatted based on how the data was marked up. Tags in GML tended to
look like this:
:h1.Chapter 1:  Introduction
:p.GML supported hierarchical containers, such as
:li.Ordered lists (like this one),
:li.Unordered lists, and
:li.Definition lists
There were other tags for citations and other types of element. You
can see this concept carried across in M$ Word, where there are lots
of Styles (Heading 1, Quote, List).

The object was never to worry about the look of a style, but simply to
ensure that your markup identified the type of data correctly. The
equivalent of CSS used by the script processor would then format
everything based on its data type. You never knew what a book was
going to look like until you had compiled and printed it. M$ Word
documents written using styles rather than individual text formatting
are far easier to manage.

tags and their usage

Quoted text here. Click to load it

Well you only mentioned 2 tags not 3, but I assume that you meant to
include <dl>.

I'm not sure what it is about the w3schools explanation that is not
clear. A definition list is a list of terms and their definitions. Far
from being the same, the w3schools page shows that the item (or term)
to be described is defined in the dt tag and the description of that
item is in the dd tag.

We have dl = definition list, dt = definition term, dd = definition

A search using the popular search engine Google for the words
definition list
(I got those words from the w3schools page), gives many otehr pages
that talk about definition lists. One of them has the summary:
"This article explains what definition lists are why they are useful,
and how use them when writing HTML documents.", which sounds like just
what you are asking.

In future you may find it quicker to use Google to search for the
subject of your query and to peruse the summaries of the pages that it

Alternatively just keep asking here and I'm sure we will be only to
happy to type the terms into Google for you.

tags and their usage

On 16/04/2012 15:14, Captain Paralytic wrote:
Quoted text here. Click to load it

Fwiw I was looking at where
under Definition and Usage we have:

The <dd> tag is used to describe an item in a definition list..... and
<dt> (defines the item in the list).

English is my first language and it isn't clear. Not helped by the example:

    - black hot drink
    - white cold drink

In which it is anybody's guess where the list is, what is being defined,
what is being described, and what the items are.

Thanks for your help. It does help to ask people rather than googling. I
know you wouldn't reply if you didn't want to.

Tim W

tags and their usage

On Mon, 16 Apr 2012 07:14:20 -0700, Captain Paralytic wrote:

Quoted text here. Click to load it

He identified all 3 in the subject, and in the text commented that two of
three appear to act in a similar manner.


Denis McMahon

tags and their usage

Quoted text here. Click to load it

Oh, as to this question. The use of the dl and dd tags (I can no <dt>
tags there), is certainly wrong in teh referenced context, but the
results are fairly predictable. Using something for a purpose for
which is is not intended may not be correct, but it does not follow
that the results of such use cannot be predicted.

A hammer is not supposed to be used to open a bottle, but I can fairly
well predict that if you keep hitting the bottle with a big enough
hammer, the bottle will break.

tags and their usage

Tim W wrote:
Quoted text here. Click to load it

Many will agree here  that is not the best resource,
peppered with errors and has no association with I would agree
that the application is wrong in wikipedia, a poem is not a definition
list. I would say is akin to using H# elements simply to make your text
larger. A far better approach is to make a "poem" class and style
appropriately there. Maybe make the "white-space: pre"

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
    " ">
    <style type="text/css">
    .poem {
        color: #000; background: #ddd;
        margin: 1em; padding: 1em; border: 1px solid #000;
        display: table-cell;
    /* make elements in poem preserve white space formatting */
    .poem * { white-space: pre; }
    .poem p { margin: 0; padding: 0; }    
    .poem .chorus { font-style: italic; }
    .poem .attibute { white-space: normal; text-align: right; }

<div class="poem">
Nid wy'n gofyn bywyd moethus,
Aur y byd na'i berlau mn:
Gofyn wyf am galon hapus,
Calon onest, calon ln.
     Calon ln yn llawn daioni,
     Tecach yw na'r lili dlos:
     Dim ond calon ln all ganu
     Canu'r dydd a chanu'r nos.
Pe dymunwn olud bydol,
Hedyn buan ganddo sydd;
Golud calon ln, rinweddol,
Yn dwyn bythol elw fydd.
<p class="chorus">
Hwyr a bore fy nymuniad
Gwyd i'r nef ar adain cn
Ar i Dduw, er mwyn fy Ngheidwad,
Roddi i mi galon ln.
<p class="chorus">
<div class="attibute">
&mdash; Welsh


Quoted text here. Click to load it

Look at the info source and they have examples:


Take care,


tags and their usage

<dl> tag  : It is used to define the definition list
<dt> tag : It is used to define item in the list
<dd> tag : It is used to describe the item in the list

Many of the times, these tags are used in place of table tags.


'Los Angeles Website Design' ( /) | '*Web
Development Company*' ( ) | 'Web Design Orange
County' ( /)| 'Graphic Design
Portfolio' ( /)
Alan_Smith's Profile:
View this thread:

Message Posted via the webmaster forum , (Ad revenue

tags and their usage

Alan_Smith wrote:

Quoted text here. Click to load it

Not in the real world...

Have you fixed the errors on your web site yet?

   -This space for rent, but the price is high

Site Timeline