Starting HTML- Part 5 |
| <A name=example>Example links:</A> |
Where the link name example would be used in the link used to access it.
To direct a viewer to this area of the web page you would create a link to the named anchor using <A HREF="#anchor name>. The example links: text below is a named anchor (anchor name=example).A link to this anchor would look like this:
Click to see some examples
The HTML code is
| Click to see <A href="#example">some examples</A> |
Here are a collection of relative and absolute link examples:
Link to home page this is a relative link. HTML is:
| <A href="index.htm">Link to home page</A> |
link to top of this page this is a relative link to a bookmark. HTML is:
| <A href="#Anchors and Linking">link to top of this page</A> |
link to another web site this is an absolute link to a page on another web site.. HTML is:
| <A href="http://www.oeupdates.com/index.html"> link to another web site</A> |
Absolute Link examples:
Link to home page absolute link
link to top of this page absolute link to a bookmark
link to another web site this is an absolute link to a page on another web site
HTML for the above links:
| <a href="http://www.build-your-website.co.uk/index.htm">Link to home page</a> absolute link <a href=http://www.build-your-website.co.uk/starting-html-part5.htm#Anchors and Linking>link to top of this page</a> absolute link to a bookmark <a href="http://www.oeupdates.com/index.html">link to another web site</a> this is an absolute link to a page on another web site |
The text at the top of the starting-html-example.htm page starts as follows:
| Starting HTML - A beginners Guide |
Create a named anchor called start-top for this text
Starting HTML - A beginners Guide
and now create a link to it from another document as follows with the following text:
This link will take you to the top of the starting-html-examples page.
Answer:
|
Anchor:
Link:
|
part4<------Previous
You've now completes the short course and should now be ready to make your first real web pages. You won't be doing this with Html but with a web page editor (see how to make web pages using a web page editor). You will find the HTML knowledge invaluable when it comes to correcting some editor quirks (and they all have them).
I have a copy of the HTML book (adjacent links) and I find it invaluable for checking syntax and attribute properties etc. If you are going to be making your own pages I strongly suggest you get yourself a good HTML book.
Starting HTML sections:
Note: You may have noticed the term XHTML appearing. XHTML is the replacement for HTML. However the difference between the two is very minor and are covered in HTML to XHTML in 10 steps and XHTML.
Related Articles and resources:
|
|
Amazon UK
HTML for the World Wide Web with
XHTML