Page Anchors

K

keevsbiz

I have read on how to set page anchors but I still don't see how and
where to set them, if lets say on my website www.standupgoogle.com, I
want a link at the top on the page, that reads CHECK OUT THE ACTION!
and it moves the page to line 44, the start of the stand up comedy
videos
 
A

Andy Dingley

if lets say on my website www.standupgoogle.com, I
want a link at the top on the page, that reads CHECK OUT THE ACTION!
and it moves the page to line 44, the start of the stand up comedy
videos

<a href="#videos" >CHECK OUT THE ACTION!</a>

[...]

<div id="videos" >
The video stuff
</div>


PS - Throw away whatever editing tool you're using. That thing makes
worse code than Frontplague.
 
A

Andy Dingley

Gernot said:
why not:
<a name="videos"> ??

That would work too.

I didn't specify that because:

- It's an old and obsolete way of doing it. Using id is simpler,
consistent with the use of id for DHTML purposes, and works everywhere
(for good values of "everywhere")

- I didn't want to confuse the OP with alternatives. Just use id

- Strictly the form should be
<a name="videos" >Some text or content</a>
Opera has been known to complain about an empty <a name="..." >
element
(it's a minor issue but it's less reliable than using id)
 
G

Gernot Frisch

- It's an old and obsolete way of doing it. Using id is simpler,
consistent with the use of id for DHTML purposes, and works
everywhere
(for good values of "everywhere")
Opera has been known to complain about an empty <a name="..." >
element
(it's a minor issue but it's less reliable than using id)


Thank you for the information.
 
J

Jake

In message said:
I have read on how to set page anchors but I still don't see how and
where to set them, if lets say on my website www.standupgoogle.com, I
want a link at the top on the page, that reads CHECK OUT THE ACTION!
and it moves the page to line 44, the start of the stand up comedy
videos

The link:

<a href="#cota">CHECK OUT THE ACTION!</a>


and then the target:

<a name="cota" id="cota"></a>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,763
Messages
2,569,562
Members
45,038
Latest member
OrderProperKetocapsules

Latest Threads

Top