Question Locked

HTML

0 helpful
9 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.
What is the HTML code for linking something from the top of the page to further down the page? (without switching the page)

9 replies

by deadly ernest

here's an example with the < > at each end of the code replaced with - so it won't render as html

the link info at the top

-A HREF="#para1"- Day 1 Saturday -/A-

the link at the other point you wish to go to

-A NAME="Para1"- -/A-

this will work anywhere on the page

if doing the top of the page and go top, you usually use this code

place this as part of the heading line

-a name="#top"-

and this at the bottom

Go to -a href="#top"- Top -/a-

again - equals the relevant < >

for some reason the TR page is adding a bit

quote
rel="nofollow"

end quote

in the last section of code, please ignore that and do not include the added bit.

by thumbsup2

To show the brackets, you have to convert them to the character reference.

The < is represented using &lt;

The > is represented using &gt;

And, just in case Technogeek is still confused, here's what it actually looks like:

------------------

<a name="top">This is the top, otherwise known as a bookmark or placeholder.</a>

then, you would have a bunch of other stuff which creates the page scrolling down maybe...

<a href="http://www.somewhere.com">This is a link to another page</a>

That is what a normal link looks like.

<a href="#top">This is a link to the TOP where it has been bookmarked.</a>

The above links back to the place you've named within the same page.

Hope that helps.

by thumbsup2

The rel="nofollow" is added by the forum even though the brackets are really character references and the link shouldn't be live.... ****sigh**** :-&

by deadly ernest

to ignore the no follow - it wasn't there on my entry, nor on the edit entry, but on the display.

by thumbsup2

If you use character entities to display the brackets, then later want to edit your post... you have to go replace all the brackets with character entities again. That is why I did NOT edit my post to say something about the NoFollow, instead posting a reply to my own post... I'm too lazy! ;)

by deadly ernest

If you see something you like on a web page and you want to know how they did it, just place the cursor on the page and right click, that will open a sub window and you chose 'View Page Source' to allow you to look at the code. this works great for learning new code tricks unless you're looking for html and they used java or flash - then you become a curser.

by thumbsup2

There's even a way to see the source when a page is loaded using frames....

For those of us who've learned through the school of hard knocks... there are quite a few tricks under our belt! ;)

This discussion is closed to new replies.