cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kjetil Kjernsmo <kje...@kjernsmo.net>
Subject Re: Empty anchor tags
Date Tue, 29 Oct 2002 16:56:28 GMT
On Tuesday 29 October 2002 17:26, Tuomo L wrote:

> <a name="foo">

Whooa, that would be a spec violation, IIRC... :-) 

> Called with:
>
> <a href="#foo">link to foo</a>
>
> This doesn't work with IE:
>
> <a name="foo"></a>
>
> Ideas anyone?

Use the id-attribute. All elements have an id-attribute which is 
intended for this purpose. Presumably, you can use the id-attribute 
with some other element, e.g. a header
<h2 id="foo">This is the Foo Subsection</a>
or, if there is no natural anchor there, you need one of the generic 
elements, span for inline and div for block, e.g.: 
There's a <span id="foo">Foo</span> in the Bar!

See http://www.w3.org/TR/html401/struct/global.html#adef-id

Note that id is a relatively new attribute, and not all older browsers 
support it, lynx was the first, AFAIK! :-)

Best,

Kjetil
-- 
Kjetil Kjernsmo
Astrophysicist/IT Consultant/Skeptic/Ski-orienteer/Orienteer/Mountaineer
kjetil@kjernsmo.net  webmaster@skepsis.no  editor@learn-orienteering.org
Homepage: http://www.kjetil.kjernsmo.net/


---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

To unsubscribe, e-mail:     <cocoon-users-unsubscribe@xml.apache.org>
For additional commands, e-mail:   <cocoon-users-help@xml.apache.org>


Mime
View raw message