Things you want to know about websites

 

Links

Links are one of the most important part of a webpage. They let you go from one page to another, play a sound clip, play a video clip or download files.

Link to another page

To create a link to another page, we use the anchor <a> tag.

Example

The anchor

<a href="http://www.tomakewebsite.com">Open Tomakewebsite.com</a>

creates a link to this website's home page. The href="" part is called the destination as it defines the address of the page you are linking to. The part between opening and closing tags is called the label as it show in the text. This shows as

Open Tomakewebsite.com

Target attribute

The target attribute defines where the new page will open. For example in a new window.

It can have the following values:

_blank Opens the document in new blank window.
_parent Opens in document in the parent frame.
_self Opens in the document in the current frame where it was clicked.
_top Opens the document in the top most frame.

Link to a place in a document

You can also make a link to a point some where in a document or current document by using anchors.

First you will have to define an anchor at the section of the page where you want to jump when the link is clicked.

You define an anchor we use the name attribute in the <a> tag.

Example

<a name="top">Point</a>

creates an anchor named point.

Now to access this anchor or to link to this anchor you include the # sign in the href address, as show below.

<a href="#point">Jumpt to point</a>

will jump to the section where you have placed the point anchor.

To show you how it works exactly, i have placed an anchor named "top" at the top of this page where you see the top heading "Links". Now click Go to top and it will take you to the top.

You can link to this anchor (point) from other document. Lets say this anchor is placed in a page named example.html located at example.com, then you can use the anchor as,

<a href="http://www.example.com/example.html#point">Jump to point</a>

This will open the page at exactly the place where the point anchor is placed.


Bookmark or Add to Favourites

Next:

Html-Tables

Related:

Html-Lists

Link to this page :

Copy and paste the following code in an html document to link to this page,