New tutorials View all
Encapsulation in PHP
Abstract classes in PHP
An introduction to MySQL databases in PHP
Creating a user login and registration system.
First Lesson of HTML
New forum replies
Jim in errorsPaul in errorsJim in Im Stuck On The Member System Tut...scott33 in Im Stuck On The Member System...Jim in Test topicCodefreek in My IRC Bot,Jim in 2.1, likes and dislikes
New frontpage replies
tutorials: Creating an IRC bot in PHPtutorials: Creating an IRC bot in PHPtutorials: Creating an IRC bot in PHPtutorials: Creating an IRC bot in PHPtutorials: Creating an IRC bot in PHP
New articles
New news
Anchors in HTML (23 views)
Anchors, what are they? And even more interesting, how do you make them? In this tutorial you will learn the ins and outs of HTML page content jumpers.
Many people don't know what anchor are, and how they work. In this tutorial I will show you through examples how they work.
What is an anchor?
An anchor consists out of two things, a point and a link. An anchor point is a place in your content where you want to link to. People also call it "page content jumpers", because it jumps to another part of the page.
Take the following page: My school page.
You'll see a list of subjects, and answers beneath it. The links are anchor links, and it sends you to the anchor point. This is a working example of an anchor.
How do you make anchors?
It's actually quite simple, take a look at the following example:
The first line (Anchorlink) is the link to the anchor called "anchor". Note that you always add a "#" before the name, or else it won't work. I assume the rest of the tag speaks for itself.
The second line (Anchorpoint) is the point. Just add the name of the anchor in the name="..." attribute. So this is the place the link will send you to. Note that this time you don't add a "#" before the name.
One little anchor example:
Back to the top of this tutorial
Well that was easy right?
What is an anchor?
An anchor consists out of two things, a point and a link. An anchor point is a place in your content where you want to link to. People also call it "page content jumpers", because it jumps to another part of the page.
Take the following page: My school page.
You'll see a list of subjects, and answers beneath it. The links are anchor links, and it sends you to the anchor point. This is a working example of an anchor.
How do you make anchors?
It's actually quite simple, take a look at the following example:
| php | |
|
1 2 3 4 5 |
<a href="#anchor">Anchorlink</a> <!-- Some content bla bla --> <a name="anchor">Anchorpoint</a> |
The first line (Anchorlink) is the link to the anchor called "anchor". Note that you always add a "#" before the name, or else it won't work. I assume the rest of the
The second line (Anchorpoint) is the point. Just add the name of the anchor in the name="..." attribute. So this is the place the link will send you to. Note that this time you don't add a "#" before the name.
One little anchor example:
Back to the top of this tutorial
Well that was easy right?

Replies on Anchors in HTML:
Jump to comment page: 1
Jump to comment page: 1
You are not logged in. Please login or register an account, it just takes 30 seconds.

Can you do it in this way:
<p name="HTML">HTML</a>
<a href="#HTML">Back to html</a>