Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > Named anchor question

Reply
Thread Tools

Named anchor question

 
 
Mark Parnell
Guest
Posts: n/a
 
      06-28-2005
Previously in alt.html, LaBlueGirl <(E-Mail Removed)> said:

> <h1 size="2" name="top">Inline Anchors</h1>


The name attribute is not valid on a heading.

> Where do I put the named anchor in the second paragraph?


Use id, not name.

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

--
Mark Parnell
http://www.clarkecomputers.com.au
alt.html FAQ :: http://html-faq.com/
 
Reply With Quote
 
 
 
 
LaBlueGirl
Guest
Posts: n/a
 
      06-28-2005
Newbie here.
Working on an exercise document.
Question:
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
page.</p>
<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....

Thanks
LBG

--
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,
Kool-Aid!"
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.

 
Reply With Quote
 
 
 
 
Jonathan N. Little
Guest
Posts: n/a
 
      06-28-2005
LaBlueGirl wrote:

> Newbie here.
> Working on an exercise document.
> Question:
> 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
> page.</p>
> <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....
>
> Thanks
> LBG
>

Anchor:

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

--
Take care,

Jonathan
-------------------
LITTLE WORKS STUDIO
http://www.LittleWorksStudio.com
 
Reply With Quote
 
Ian Rastall
Guest
Posts: n/a
 
      06-28-2005
On Mon, 27 Jun 2005 19:15:54 -0700, "LaBlueGirl" <(E-Mail Removed)>
wrote:

>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....


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!

HTH

Ian
--
Was it not a comedy, a strange and stupid
matter, this repetition, this running around
in a fateful circle? (Hermann Hesse)
http://www.bookstacks.org/
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Get the named anchor from the URL? Greg Collins [Microsoft MVP] ASP .Net 6 10-12-2006 12:14 AM
How to - named anchor on another page? help please netrate@yahoo.com HTML 1 03-30-2006 10:46 PM
named anchor Nalaka ASP .Net 6 12-29-2005 01:17 AM
Help understanding HTML "Named Anchor" Jeff Wisnia Computer Support 3 04-06-2005 04:48 AM
Jump to named anchor after form processing Robert Mark Bram ASP General 3 10-20-2004 11:17 PM



Advertisments