You are here: Home / Dog Blog / Archives

HTML Tag Reference

Thursday 18 December, 2003 ( 6:07PM GMT)

Dog collar and tagAdding another 70-odd pages to HTML Dog, an HTML tag reference is the latest addition to the site. Call it a Christmas present.

I have attempted to put together a tag reference that is slightly different to others out there - an accurate reference focussed on strict web standards.
I have made the kind of reference I would like to use and I hope that this will result in a reference that other standards-focussed web designers will also want to use.

In keeping with the rest of HTML Dog, the reference covers the tags and attributes that belong to strict XHTML. Actually, much of the information has been pulled out of the modules that make up XHTML 1.1 modules, so there are very minor differences from XHTML 1.0 Strict such as the lack of border and lang attributes.

I have tried to be as accurate as possible (I have come across some surprising mistakes in other similar references), gathering information from W3C resources and have hopefully produced something easier to read than the notoriously confusing W3C documentation.

At the last minute I begrudgingly added a page to briefly cover b, i, tt, big, small, sub, sup and hr tags because although I don't think they should be used, they are a part of strict W3C XHTML and in such a way are 'valid' tags. At least the reference can point out that there are better alternatives to those less aware.

It has been a long, gruelling and not too exciting project, but it is one that I think is necessary for a site such as this. Future updates may include links to the relevant W3C documentation and valid content, but I'm going to take a break from it at the moment. There are other things to be done - a CSS property reference will hopefully be along sometime soon.


Comment 1

It's a great addition to the site Patrick !

So said Bart Noppen on Thursday 18 December, 2003 at 10:41PM GMT.

Comment 2

Your are putting a lot of work into this site. Congrats.
What are your future plans for htmldog?

So said [Anon] on Friday 19 December, 2003 at 10:07AM GMT.

Comment 3

The keywords are highlighted in the reference but aren't clickable links. For example from title, I expect to be able to click on the word head to get to that reference.

So said on Monday 22 December, 2003 at 10:05PM GMT.

Comment 4

Very nice XHTML reference, however, I wasn’t able to get the difference between <abbr> and <acronym> as you explain them.

I interpret an abbreviation as, for example, CIA and FBI, in which every word is represented by its first letter, whereas an acronym takes the form of MySQL, which uses more than one word (M-y) for one of the words it stands for. To be an abbreviation, it should be MSQL.

As I’m a native spanish speaker, that could be different in english language (in which are based the specs).

So said JH Sales on Tuesday 23 December, 2003 at 2:48PM GMT.

Comment 5

I think that - technically - an abbreviation is spoken as a succession of letters: eff-bee-eye, not fbih; see-eye-ay, not kiyah. An acronym is spoken as a word, e.g. NATO, not enn-ay-tee-oh. SQL is an acronym if you pronounce it "sequel", an abbreviation if you pronounce it "ess-queue-ell".

So said Chris Hunt on Wednesday 24 December, 2003 at 11:43PM GMT.

Comment 6

Abbreviations and acronyms seem to throw up a hell of a lot of confusion. Here's the way I see it:

"An abbreviation is a shortened form of a phrase. Very general. An acronym however is an abbreviation made up of the initial letters (or parts of words) of the phrase it is representing. So CSS is a valid acronym, whereas HTML and XHTML are not (if 'Hypertext markup language' was an acronym, it would be 'HML'. Similarly, XHTML would be EHML)."
as it says in the 'Mastering Text' page ( ).

From what I've picked up over the past few months, the big problem is that it would appear just about every country / culture / society the world has ever seen has a different interpretation of just what makes an acronym or an abbreviation.

The pronunciation idea that Chris mentions is, as far as I can tell, an American thing.

So said Patrick on Friday 26 December, 2003 at 10:45PM GMT.

Comment 7

Not by this American. Acronyms are, and ever are, comprised of the first letters of each word (excluding the ocassional 'the' and 'a'). Any other shortened version of a longer phrase is simply an abbreviation. Bear in mind that all acronyms are abbreviations, and if you mark them all as abbr, that's ok.

Funny, i expected the cinfusion to be between cite and q.

So said Neal on Monday 29 December, 2003 at 8:37AM GMT.

Comment 8

By the way - as <!DOCTYPE> is given in the list, shouldn't the comment tag be mentioned? I wonder how you would alphabetize that...

So said Neal on Friday 2 January, 2004 at 11:24AM GMT.

Comment 9

I'm glad I was obviously wrong about the abbreviation/acronym thing. The confusion surrounding them is apparently quite random and odd.

And HTML comments - yeah, I should add a page. Do I show it as '!', '!--', '[comment]'??

So said Patrick on Friday 2 January, 2004 at 11:41AM GMT.

Comment 10

That's a really good question. The ! is on the Doctype declaration as well - as you've left it off of that, I suppose you should here as well. As -- is what signals a comment, perhaps just "--"?

So said Neal on Monday 5 January, 2004 at 6:28AM GMT.

Comment 11

Neither DOCTYPE or comments are classed as tags. Really, I think you should leave them both off.

So said Dan Webb on Wednesday 7 January, 2004 at 5:00PM GMT.

Comment 12

While you're absolutely correct in a purist fashion, they are important parts of webpage structure and merit definition. A caveat that they are not really tags is at least in order.

Incidentally, the example for <cite> is not very clear. Is "banana" intended to be the source of some information? The definition says it is to be a citation, but the example bears no resemblance to the examples found in the W3C specs. I don't think <cite> is properly applied in the example.

So said Neal on Tuesday 13 January, 2004 at 9:36PM GMT.

Comment 13

As an Englishman who speaks English as it was meant to be spoken (I am of course joking), I have always believed the difference between abbreviation and acronym to be this:

1) Abbreviation : The shortening of a phrase to it's initials (eg. Cascading StyleSheet = CSS).

2) Acronym : An abbreviation that in itself makes another recognisable word (eg. Campaign for Liberation and Integration of Terrifying Organisms and their Rehabilitation Into Society = C.L.I.T.O.R.I.S.).

An etymologist would recognise 'acro' means ultimate' and that 'nym' means name so we have the 'ultimate name'.

In conclusion, while both are abbreviations, they are NOT interchangeable. Therefore if you want to be the most anal follower of semantics, you should go through the site and change all CSS references marked up as to . Hope this clears things up. :)

So said Iain on Thursday 15 January, 2004 at 5:03PM GMT.

Comment 14

Oops, that last line should end: "...all CSS references marked as <acronym> to <abbr>. :p

So said Iain on Thursday 15 January, 2004 at 5:49PM GMT.

Comment 15

Well, this is interesting. I begin with the standard caveat that dictionaries are descriptive, not proscriptive.

See for some definitions. One implies radar would be an acronym, one implies it would not. Merrian Webster ( says an acronym is "a word (as NATO, radar, or snafu) formed from the initial letter or letters of each of the successive parts or major parts of a compound term."

In none of the definitions I have found is it stated that the end result must be pronounced as a word. It so happens that all examples given can be, but this is never laid down in a definition.

So what's the ultimate answer? I think it must come down to common author usage. I don't think it is correct to say it's wrong to call CSS an acronym. It's also not necessarily wrong to call HTML an acronym. These do fall into the gray area, however. Certainly we can agree that "NATO" ought to be considered an acronym, and "inc." ought not. Perhaps, as all acronyms that are questionable are surely abbreviations, it's better to label all questionable acronyms as abbr elements.

Perhaps the answer lies in how speech readers use the acronym element. Do commonly used speech agents do anything in particular with acronyms?

Finally, I've always abbreviated "abbreviation" as "abbv." so I always tend to misspell the abbr tag. Who's with me?

So said Neal on Monday 19 January, 2004 at 11:30AM GMT.

Comment 16

In the most I would agree with you Neal. I would never seek to proscribe an interpretation as I may be wrong and there are umpteen ways to read different interpretations into what is a very grey area - although, secretly, I'm pretty sure I'm right. ;)

My reply would be that since we are going to such lengths to unlearn all our old bad habits in the way we use HTML and CSS (in themselves now fairly unforgiving and proscriptive standards) we should embrace an opportunity to firmly delineate the meanings of these two tags. Namely, only using <abbr> when an abbreviation is rendered simply as a sequence of initials and <acronym> when it creates a pronouncable word.

Of course, we could start our own movement to rename CSS with an acronym. My suggestion would be CuSS as this is what I frequently do when my lovingly-crafted valid layout renders as a mess of text overlapping borders and images in IE. :D

So said Iain on Wednesday 21 January, 2004 at 1:29PM GMT.

Comment 17

Well, we aren't going to decide what these tags mean in this blog, that's for certain. And the W3C specs are dependably tacit on exactly what is and is not an acronym. If we go by the dictionary, we include CSS. If we go by common usage, CSS might not be an acronym.

I say, do what you feel is right as an author. I don't know of any real functionality differences between how abbr and acronym are rendered. So we must ask whether the meaning of the content is enhanced by the tags. So long as that's your guiding principle, I suppose either markup can be considered correct.

So said Neal on Saturday 24 January, 2004 at 6:23AM GMT.

Comment 18

I'm not sure where the confusion is. An abbreviation is an abbreviated word or phrase. From
A shortened form of a word or phrase used chiefly in writing to represent the complete form, such as Mass. for Massachusetts or USMC for United States Marine Corps

OR....BR for break as in

An acronym is a -word- formed from the initial letters, or parts of a series of words of a multi-word name, like radar, J.A.G., HALO (High Altitude, Low Opening) Jump.

As explained earlier, an abbreviation is not necessarily an acronym (like the example "inc."), but an acronym CAN be an abbreviation (Like JAG)

So said Mike on Friday 8 October, 2004 at 4:02AM GMT.

Comment 19

Is <hr /> really a presentational tag, though? I can certainly see that case for it having semantic meaning -- it represents a topic break. You quite often see little symbols (like "***") between sections in books to denote that the current section has come to an end, and we're now switching viewpoint characters, or suchlike.

(I certainly admit that it's almost always used for its presentational aspect, and is poorly named for such a semantic approach... but it's the only element that I can think of with that exact meaning.)

So said David Lynch on Wednesday 22 June, 2005 at 9:15PM GMT.

Comment 20

Neither DOCTYPE or comments are classed as tags. Really, I think you should leave them both off.

So said patrick on Tuesday 8 November, 2005 at 11:32AM GMT.

Comment 21

Good point. I think maybe they need to be in there so that people are aware of them, but perhaps it should be made clearer that they're not actually HTML tags.

So said Patrick on Tuesday 8 November, 2005 at 11:48AM GMT.

Comment 22

>Is really a presentational tag, though?
Yes it is. The name says horizontal rule, which is presentational. The W3C is considering a name change, though.

So said Tom on Saturday 17 December, 2005 at 8:50PM GMT.

Comment 23

>Is <hr /> really a presentational tag, though?
Yes it is. The name says horizontal rule, which is presentational. The W3C is considering a name change, though.

You should just htmlentities() the comments.

So said Tom on Saturday 17 December, 2005 at 8:56PM GMT.

Comment 24

An acronym may be an abbreviation of sorts, but when it comes to the definition of 'abbreviation', it's the shortened form of a word, not a bunch of words. "INC" is an abbreviation. "IP" is an acronym.

So said Roy Dale on Saturday 27 May, 2006 at 7:26PM GMT.

Comment 25

You're not wholly right Roy (an abbreviation *can* be a shortened form of a bunch of words, for example), although there is some room for opinion (such as your definition of an acronym). You might find this interesting:

So said Patrick on Saturday 27 May, 2006 at 7:58PM GMT.

Comment 26

I was wondering if you have turned this into a pocket reference? I like something to hold in my hand and waste a few more trees. ;)

So said Jim Welch on Monday 26 June, 2006 at 8:56PM GMT.

Comment 27

BTW: The reason I am asking for a poket reference, is that I am teaching boy scouts the computer merit badge. I am teach XHTML and CSS from the start. Their required web page must use XHTML and CSS to pass the merit badger (my requirements - not BSA).

So said Jim Welch on Monday 26 June, 2006 at 9:07PM GMT.

Comment 28

Comments on this post have now been shut down thanks to receiving more spam than Sainsbury's.

So said Patrick on Thursday 10 August, 2006 at 6:19PM GMT.

See Also

^ Top

SiteGround: Fast, reliable, recommended hosting.