Jump to content

anchor


Nusja

Recommended Posts

Hi, does anybody know why an anchor could be visible?<a href="#estonian">See the text in Estonian</a><a name="estonian"></a>Tere! Minu nimi on Niina. Mina olen kakskummend neli aastat vana. <p>My anchor shows on my page. :) Thanks!!!

Link to comment
Share on other sites

try this:

<a href="#estonian">See the text in Estonian</a><a id="estonian"><p>Tere! Minu nimi on Niina. Mina olen kakskummend neli aastat vana. </p></a>

I always put something inside the anchor tag, and i changed the name attribute to id so its XHTML compatibledain

Link to comment
Share on other sites

<p><a href="#estonian">See the text in Estonian</a></p><p id="estonian">Tere! Minu nimi on Niina. Mina olen kakskummend neli aastat vana. </p>

Fixed.I don't understand why people always put the link destination inside an achor. If your anchor doesn't have a href, then it shouldn't be an achor at all.

Link to comment
Share on other sites

if there's more than one bookmark in a paragraph,

In which case you'd do this:
<p>In this paragraph we have two "bookmarks". <span id="bm1">Here is the first</span> and <span id="bm2">here is the second.</span>. This paragraph is very weird because internal links usually don't bring you to the same place.</p>

Though bookmarks usually tend to be paragraphs or headings.<a> shouldn't be used cause it's purpose is to make a link. Something which isn't clickable to go somewhere else isn't a link.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...