12.HTML Text Links Tutorial

First of all it is html text links tutorial.A web page will contain numerous links that take you on to different pages and even specific components of a given page. These links square measure called hyperlinks.
Hyperlinks permit guests to navigate between internet sites by clicking on words, phrases, and images. therefore you’ll be able to produce hyperlinks victimization text or pictures out there on a web page.

Linking Documents

A link is such mistreatment hypertext mark-up language tag <a>. This tag is named anchor tag and something between the gap <a> tag and therefore the closing </a> tag becomes a {part of} the link and a user will click that part to succeed in to the joined document. Following is that the easy syntax to use <a> tag.
<a href="Document URL" ... attributes-list>Link Text</a>

Example

<!DOCTYPE html>
<html>
<head>
<title>Hyperlink Example</title>
</head>
<body>
<p>Click following link</p>
<a href="https://www.google.com" target="_self">Google</a>
</body>
</html>

This will manufacture the subsequent result, wherever you’ll click on the link generated to succeed in to the house page of Tutorials purpose (in this example).

Click following link

Google

 

The target Attribute

We have used target attribute in our previous example. This attribute is employed to specify the situation wherever joined document is opened. Following square measure the attainable options:

html text links tutorial

[html text links tutorial]

Example

<!DOCTYPE html>
<html>
<head>
<title>Hyperlink Example</title>
<base href="http://www.mysite.com/">
</head>
<body>
<p>Click any of the following links</p>
<a href="/html/index.htm" target="_blank">1.Opens in New</a> |
<a href="/html/index.htm" target="_self">2.Opens in Self</a> |
<a href="/html/index.htm" target="_parent">3.Opens in Parent</a> |
<a href="/html/index.htm" target="_top">4.Opens in Body</a>
</body>
</html>

html text links tutorial

Linking to a Page Section

You can produce a link to a selected section of a given web page by mistreatment name attribute. this is often a ballroom dance method.
First produce a link to the place wherever you would like to succeed in with-in a web page and name it mistreatment <a…> tag as follows:

<h1>HTML Text Links <a name="top"></a></h1>

Second step is to make a link to link the document and place wherever you would like to reach:

<a href="/html/html_text_links.htm#top">Go to the Top</a>

Result:

html text links tutorial

Setting Link Colors

You can set colours of your links, active links and visited links mistreatment link, alink and vlink attributes of <body> tag.

Example

Save the subsequent in check.htm and open it in any application to envision however link, alink and vlink attributes work.

<!DOCTYPE html>
<html>
<head>
<title>Hyperlink Example</title>
<base href="http://www.tutorialspoint.com/">
</head>
<body alink="#54A250" link="#040404" vlink="#F40633">
<p>Click following link</p>
<a href="/html/index.htm" target="_blank" >HTML Tutorial</a>
</body>
</html>

html text links tutorial

Download Links

You can produce text link to create your PDF, or DOC or nothing files downloadable. this is often terribly simple; you only got to offer complete universal resource locator of the downloadable file as follows:
<!DOCTYPE html>
<html>
<head>
<title>Hyperlink Example</title>
</head>
<body>
<a href="http://www.mysite.com/page.pdf">Download PDF File</a>
</body>
</html>

html text links tutorial

Finally it was all about html text links tutorial.Please practice all the steps to become a good web designer.Our next tutorial is about XXX.Read it here XXX.

Comments

comments