Given that acronym
is removed in HTML 5, how does one get standards support with similar functionality? Every other removed tag looks like CSS can do it, but that one seems to be removed completely...
views:
55answers:
4Just use <abbr>
instead. That's what the spec says now:
The
abbr
element represents an abbreviation or acronym, optionally with its expansion.
If you want to be specific with your semantics, perhaps adding class="acronym"
would do the trick. I think that's as far as you can go.
Can you clarify exactly what you're trying to make it look like? The default style for <acronym>
differs across browsers. Opera uses a dotted underline and Chrome doesn't style it all, for example. Are you trying to emulate a particular browser's default style?
However, if you mean the tooltip-style message that appears on mouse hover, you should be able to use the same attribute in <abbr>
as before: title="your acronym's definition"
.
The acronym
element was folded into the abbr
element, because
- most HTML authors didn't know the difference between an acronym and an abbreviation and thus used them wrongly and
- for the use cases of those two elements, the difference between an acronym and an abbreviation are irrelevant anyway.