Earlier today I was looking at a page I was updating to add acronyms (I do not believe in getting rid of them because the current working draft is leaning against it, once it gets closer to/is ratified I may change my stance) and abbreviations and I found that my global search and replace caught an acronym within the alt text of an image. Must I expand the text in this case? How should one handle this?
In XHTML 1.0 nested anchors are illegal: “a must not contain other a elements.”
As for alt text abbr. depends on the audience and whether it occurs in the webpage. Though typically it would be deemed sensible to use the expanded form or parenthesis under most circumstances. Again the title attribute will come into play, if the image is meaningful enough.
In XHTML 1.0 nested anchors are illegal: “a must not contain other a elements.”?
I know, that is what I was asking: The article suggests inserting a link to the glossary page as well as the ABBR tag, but what happens if we have an abbreviation that is already inside a link?
After reading your article and found following text segemnts
- Our first goal is compliance with XHTML 2.0
– IE 7 will support the abbr element;
i ask me, is this article for the future or is this article really a suggestion for good web sites?
Please note that XHTML 2 does not exist as a specification and IE 7.0 doesn’t work with the abbr element. It don’t know which Version of IE 7.0 you use, but the Version which is shipped with Windows Vista Beta 1 ignore the abbr Element.
Next, i tested IE 7.0 with XHTML 1.1 and the Recommendation of W3C to serve XHTML 1.1 as “application/xhtml+xml”. IE 6 can’t work with this. And IE 7.0? He open it as a simple text document like open an XML document without DTD.
So i ask me XHTML 2.0 and IE 7.0 are really good samples?
Aside from that, your article is really good.
I do not understand the article’s fuss about XHTMLÂ 2. It will last years until that specification is final, and it will last even more years until most browsers will get it right. And then there will still be various Internet Explorers around and we cannot use XHTMLÂ 2 with them. As it is not backwards compatible, we are forced to send HTML to the browsers. XHTMLÂ 2 is a technology for the back end.
(Actual browsers don’t get HTML 4 or CSS 2 right. Those specifications are from last century, eight years old! And instead of fixing bugs and implementing complete and correct support for HTML 4.01 and CSS 2.0 [or CSS 2.01 at least] and preparing for CSS 3, browser vendors are making up new gimmicks for “HTML 5”?. But I am digressing ”¦)
Instead of a class=“gloss” for the links, one could use the more semantic rel=“glossary” (known from the LINK element, also allowed for the A element). But, of course, Internet Explorer does not know about attribute selectors, so you will not be able to style rel-links and have to stick to classes.
This article is almost screaming for PHP or similar language. With PHP one could define a list of words (abbr-list) with all the CSS code one could wish for, have a script run through each page and replace every occurence of any abbreviation in the abbr-list with proper coding. This way, you wouldn’t have to type every code out. And it would be easy to update which CSS code you want to put in the document as the misc. standards evolve.
You could with minimal extra work have PHP serve different abbr-lists depending on what browser the reader is using to get the best of all worlds.
“Using Javascript to expand abbreviations.”:http://www.tjkdesign.com/articles/how_to_expand_abbreviations.asp
Two different solutions actually:
– one script removes the TITLE attribute from the ABBR element, then the expansion of the abbreviation is done in plain text followed by the ABBR inside parentheses. Further occurrences of that abbreviation are left untouched.
– the second script creates a glossary on-the-fly; it parses the document to build a collection of ABBR and TITLE values then creates a Heading and a Definition List containing all the element/value pairs.
39 Reader Comments
Back to the ArticleBrian LePore
Earlier today I was looking at a page I was updating to add acronyms (I do not believe in getting rid of them because the current working draft is leaning against it, once it gets closer to/is ratified I may change my stance) and abbreviations and I found that my global search and replace caught an acronym within the alt text of an image. Must I expand the text in this case? How should one handle this?
Robert Wellock
In XHTML 1.0 nested anchors are illegal: “a must not contain other a elements.”
As for alt text abbr. depends on the audience and whether it occurs in the webpage. Though typically it would be deemed sensible to use the expanded form or parenthesis under most circumstances. Again the title attribute will come into play, if the image is meaningful enough.
Alberto Romero
I know, that is what I was asking: The article suggests inserting a link to the glossary page as well as the ABBR tag, but what happens if we have an abbreviation that is already inside a link?
Matthias Mauch
After reading your article and found following text segemnts
- Our first goal is compliance with XHTML 2.0
– IE 7 will support the abbr element;
i ask me, is this article for the future or is this article really a suggestion for good web sites?
Please note that XHTML 2 does not exist as a specification and IE 7.0 doesn’t work with the abbr element. It don’t know which Version of IE 7.0 you use, but the Version which is shipped with Windows Vista Beta 1 ignore the abbr Element.
Next, i tested IE 7.0 with XHTML 1.1 and the Recommendation of W3C to serve XHTML 1.1 as “application/xhtml+xml”. IE 6 can’t work with this. And IE 7.0? He open it as a simple text document like open an XML document without DTD.
So i ask me XHTML 2.0 and IE 7.0 are really good samples?
Aside from that, your article is really good.
Lars Kasper
(Actual browsers don’t get HTML 4 or CSS 2 right. Those specifications are from last century, eight years old! And instead of fixing bugs and implementing complete and correct support for HTML 4.01 and CSS 2.0 [or CSS 2.01 at least] and preparing for CSS 3, browser vendors are making up new gimmicks for “HTML 5”?. But I am digressing ”¦)
Agnar Ødegård
This article is almost screaming for PHP or similar language. With PHP one could define a list of words (abbr-list) with all the CSS code one could wish for, have a script run through each page and replace every occurence of any abbreviation in the abbr-list with proper coding. This way, you wouldn’t have to type every code out. And it would be easy to update which CSS code you want to put in the document as the misc. standards evolve.
You could with minimal extra work have PHP serve different abbr-lists depending on what browser the reader is using to get the best of all worlds.
Peter Foti
I’ve been searching for an <abbr> solution that would work with IE6, and this is it! ‘Nuff said!
Thierry Koblentz
“Using Javascript to expand abbreviations.”:http://www.tjkdesign.com/articles/how_to_expand_abbreviations.asp
Two different solutions actually:
– one script removes the TITLE attribute from the ABBR element, then the expansion of the abbreviation is done in plain text followed by the ABBR inside parentheses. Further occurrences of that abbreviation are left untouched.
– the second script creates a glossary on-the-fly; it parses the document to build a collection of ABBR and TITLE values then creates a Heading and a Definition List containing all the element/value pairs.
Best US UK Poker Sites Review
i thought this was a great article and if you need quality online casino, bingo or poker reviews take a look at http://www.online-casinos.co.uk