| HTML Hyper Links
There are two types of links. Local link and foreign link. The tag used to
create a link is the <A> or anchor tag. This tag will always use the attribute HREF="FileName.extention" in order to
identify the file name to link to. Before closing this tag,
provide the words to define the file. Eg: <a href="url">click</a>
Local link gets the file from the same folder as the requesting page. Use local links or sub links when all your pages are in one folder. This is an example of local link:
<A HREF="hyperlink.html"> Visit html page</A>. We call this local link because the url consists only a file name. And the link description will look like this.
Visit my html page. If you are working a page in a child folder. To get an another page under the parent folder, use two dots before the file name. Eg:<A HREF="/html.html">. This simply looks the html.html page in the upper folder but it's allways save to define the absolute root of your file when more than one folder envolves.
Foreign links are links that can get a document page from anywhere on the internet. Following is foreign link example.
<A HREF="http://www.bannerboxes.com"> Bannerbox</A> Online advertising site. This is the result of the example above:
Bannerbox Online advertsing site
Notice that active words like "Visit my html page" are highlighted and
underlined and you can give inactive description after active word. For example: [to visit my html page, please
<a href="/default.php"> click</a> here] will look like this:
to visit my html page please click here.
IMAGE LINKS
You can use an image as a link by enclosing the image source tag whithin the
anchor tag. This is the tag to display an image <img src="image.gif">. See images for image display examples. Here is how you would create an image link: <a href="/html/introduction.html><img src="/images/previous.gif"></a>. And the result will look like this: .
Jump to section of the same page
A link that jumps section of your page can be created by using named anchor tag. Here is the syntax to create a named anchor <a name="whatever">description text</a>. For example, if your page contains report that has a different sections. You can create a named anchor for the summary section header by using the following statement: <a name="summary"><h1> Report summary</a>. We have created a named tag for section of the page, now we can create the link to that section of the page. Here is how you would create the link: <a href="#summary"> Report summary </a>. And the result would look like an active link that jumps to defined section when clicked: Report Summary.
|