|
Posted by Mark Parnell on 10/06/86 11:25
Previously in alt.html, dorayme <dorayme@optusnet.com.au> said:
> <a id="something"></a>
>
> without anything between opening and closing
> tags kosher?
It's permitted by the specs, but I would recommend against it. The specs
note:
"Note. User agents should be able to find anchors created by empty A
elements, but some fail to do so."
While this is probably not relevant now (the specs *are* nearly 6 years
old), any browser that can find an anchor by id can match the id on any
other element too.
Also, if you have any CSS rules like a {...}, they will apply to your
empty anchors, as well as any actual links. You can avoid that by making
sure you use a:link, but it's easier to avoid empty anchors.
> <h1><a id="something">This should appear</a></h1>
An id can go on any element, so the <a> is superfluous.
<h1 id="something">This should appear</h1>
--
Mark Parnell
http://clarkecomputers.com.au
alt.html FAQ :: http://html-faq.com/
Navigation:
[Reply to this message]
|