Named anchor question

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
Newbie here.
Working on an exercise document.
The first named anchor was included in the heading. The link to it was
in the following paragraph. Link worked fine.
The second named anchor has no heading to fit neatly into. I can't
figure out where to place it to make the link work.
Here's a bit of the source code I was working on:
<h1 size="2" name="top">Inline Anchors</h1>
<p>I would like to click <a href="#middle">here</a> and be at the
middle of the page.</p>
<hr width="65%" align="center">

<p><b>Middle!</b> But I would like to click <a href="#top">here</a> and
be back to the top of the page<br />
or click <a href="#bottom">here</a> and be thrown to the bottom of the
<hr width="65%" align="center">

Where do I put the named anchor in the second paragraph? I have tried
just about everywhere and I can't get the first link of the second
paragraph to work....


Yo momma is so fat she eats Wheat Thicks.
Yo momma so stupid she got stabbed in a shoot out.
Yo momma so ugly even Rice Krispies won't talk to her.
Yo momma so fat when she went outside, everyone yelled, "Hey,
Yo momma so stupid she took the Pepsi challenge and chose Jif.
Yo momma is so nasty she has to creep up on the bathwater.
Yo momma so hairy it looks like she got Buckwheat in a headlock.

Re: Named anchor question

Quoted text here. Click to load it

The name attribute is not valid on a heading.

Quoted text here. Click to load it

Use id, not name.

Mark Parnell
alt.html FAQ :: /

Re: Named anchor question

LaBlueGirl wrote:

Quoted text here. Click to load it

<a name="anchorMe"></a>
<a href="#anchorMe">Jump to anchorMe!</a>

Take care,

Re: Named anchor question


Quoted text here. Click to load it

Hi LBG. One thing to keep in mind is that if the page is all on the
screen, you won't see it move.

As far as where to put the anchor, it can go outside the block-level
element, though it's not supposed to. You could always put it in a
<div>, like:

<div><a id="middle" name="middle"></a></div>

which might even validate!


Was it not a comedy, a strange and stupid
matter, this repetition, this running around
in a fateful circle? (Hermann Hesse) /

Site Timeline