English
German

HTML Text Links

HTML Hyperlinks

A hyperlink (or link) is a word, group of words, or image that you can click on to jump to a new document or a new section within the current document.

When you move the cursor over a link in a Web page, the arrow will turn into a little hand.

Links are specified in HTML using the <a> tag.

The <a> tag can be used in two ways:

   1. To create a link to another document.
   2. To create a bookmark inside a document, by using the name attribute
 

HTML Text link:

Internal - href="#anchorname"
Local - href="../pictures/picturefile.jpg"
Global - href="http://www.websitename.com/"


HTML Text Links

Use the <a></a> tags to define the start and ending of an anchor. Decide what type of href attribute you need and place this attribute into the opening tag. The text you place between the opening and closing tags will be shown as the link on a page.

Example:

<a href="http://www.hiscript.com/" target="_blank" >Hi ScriptHome</a>
<a href="http://www.gmail.com/" target="_blank" >Gmail Home</a>
<a href="http://www.yahoo.com/" target="_blank" >Yahoo Home</a>


HTML Link Targets

The target attribute defines whether to open the page in a separate window, or to open the link in the current browser window.

Example:

target=

"_blank"    Opens new page in a new browser window

_self"    Loads the new page in current window

_parent"    Loads new page into a frame that is superior to
where the link lies

_top"    Loads new page into the current browser window,
cancelling all frames

The example below shows how you would link to GOOGLE.COM, a popular sports web site. The target attribute is added to allow the browser to open GOOGLE in a new window, so that the viewer can remain at our web site. Here's the example.


HTML Anchors Tags

To link to sections of your existing page a name must be given to the anchor. In the example below, we've created a mini Table of Contents for this page. By placing blank anchors just after each heading, and naming them, we can then create reference links to those sections on this page as shown below.

First, the headings of this page contain blank, named anchors. They look like this.

HTML anchors example:

<a href="#top">Top Link</a>

<a href="#text">Text Links</a>

<a href="#email">Email Links</a>
 


HTML Email Links

Creating an email link is simple. If you want somebody to mail you about your site a good way to do it is place an email link with a subject already in place for them.

Example:

<a href="mailto:info@hiscript.com?subject=Feedback" >info@hiscript.com</a>

For sending the direct email using email tag . mailto:emailname is the format and apply in link tags. automatically email send to perticular address


HTML Download Links

Placing files available for download is done in exactly the same fashion as placing text links. Things become complicated if we want to place image links available for download. The best solution for images is to use a thumbnail link that we discuss in the next lesson.

HTML Download example:

<a href="http://www.hiscript.com/filename.zip">Dowload your link documentation</a>
 


HTML Default Links

Use the <base> tag in the head element to set a default URL for all links on a page to go to. It's always a good idea to set a base tag just incase your links become bugged somewhere down the line. Usually set your base to your home page.


HTML Tutorial,HTML Text Links, HTML Text Links example, learn HTML Text Links,explain example HTML Text Links online free training HTML Tutorial, HTML Tutorial example, learn HTML Text Links, online tutorial, download tutorial, HTML Tutorial books, HTML Tutorial videos, live videos HTML Tutorial, learn HTML Tutorial, HTML Tutorial topic HTML Text Links, live training HTML Tutorial, download free tutorial