Hypertext Link

A hyperlink, or hypertext link, or web link, or simply link, is a reference in a hypertext system to automatically switch between a document and a linked document. Hyperlinks are used in the World Wide Web to switch between web pages with a click.

In order to facilitate the navigation between web pages, the HTML language offers us the possibility to create what we call hyperlinks:

1 - Link to an URL

Any  hyperlink is defined by the tags :

<a href =" ... "> and </a>

So the hyperlink syntax becomes :

<a href=" URL  adress"> ... </a>

Example :  external link to Yahoo:

<a href="http://www.yahoo.fr"> Click here to visit  Yahoo </a>

What displays in  browser:

Click here to visit  Yahoo

We want sometimes to put a tooltip on the link to provide information on the page of the link, for this we use the command :

title =  "text of the tooltip"
<a title="This is a link to the Yahoo site" href="http://www.yahoo.fr"> Click here to visit Yahoo 

</a>

 

2 - Link to a file

HTML offers us also the possibility to create link to a file. The Html code of the link to a file is of the form:

<a href="filename.extension"> ... </a>

Note: File name is the path of the file with its extension .txt, .doc, .html ,. Pdf, ...

3 - Link to mailbox E mail

The syntax of a hyperlink to an email box is as follows:

<a href="mailto:your email address ?"> Contact </a>

Example: (link to Email address webmaster@tresfacile.net)

<a href="mailto:webmaster@tresfacile.net"> Write to the webmaster </a>

4 - Link in the same page

Sometimes you want to create a hyperlink from one text to another in the same page, such as a page top, a footer, or something that looks like ... To achieve this,
Put the mouse pointer at the place where you want to reach, for example top of page, then Insert the markup :

<a name="name"> your text here (you can also leave it empty ) </a>

Then enter the markup:


<a href="name"> top of page </a>

Leave a Reply

Ads Blocker Image Powered by Code Help Pro

Ads Blocker Detected!!!

We have detected that you are using extensions to block ads. Please support us by disabling these ads blocker.

Powered By
Best Wordpress Adblock Detecting Plugin | CHP Adblock