Sunday 19 April 2015

HTML Links

A link is group of words or images used to jump from one page to another. They are the most fundamental tag in the HTML page. So they are found mainly in all websites.

HTML <a> Tag

A <a> tag is used to jump from one page to another. It is used to display hyperlinks. When you rollover the cursor above the link, it turn into a little hand. The "href" attribute is used to denote the source of the link. It denotes the destination of the link.

For example:
<a href="https://www.blogger.com/index.html">HOME</a>
The target attribute is used to specify where to open the document. The target attribute can be given the following values:
  • _blank
  • _parent
  • _self
  • _top
For example:
<a href="https://www.blogger.com/index.html" target="_blank">HOME</a>
The id attribute is used to create bookmark inside the document itself.
<a href="#html5">See HTML5 Section</a>
<a id="html5">Introduction to HTML5</a>

For example:
<a href="#C10">See Chapter 10</a>
<h1>Chapter 1</h1>
<h1>Chapter 2</h1>
<h1>Chapter 3</h1>
<h1>Chapter 4</h1>
<h1>Chapter 5</h1>
<h1>Chapter 6</h1>
<h1>Chapter 7</h1>
<h1>Chapter 8</h1>
<h1>Chapter 9</h1>
<h1><a id="C10">Chapter 10</a></h1>
<h1>Chapter 11</h1>
<h1>Chapter 12</h1>
<h1>Chapter 13</h1>
<h1>Chapter 14</h1>
<h1>Chapter 15</h1>
<h1>Chapter 16</h1>
<h1>Chapter 17</h1>
<h1>Chapter 18</h1>
<h1>Chapter 19</h1>
<h1>Chapter 20</h1>
Hyperlinks can also be used to link email address. For that, we use the mailto:email_address in the href attribute.

For example:
<a href="mailto:edwinronaldlambert30@gmail.com">Send Mail</a>

HTML <nav> Tag

The <nav> tag is used to denote a set of navigation links. All the links inside the nav element will be regarded as a navigation link.

For example:
<nav>
<a href="https://www.blogger.com/html">HTML</a> |
<a href="https://www.blogger.com/css">CSS</a> |
<a href="https://www.blogger.com/javascript">JavaScript</a> |
<a href="https://www.blogger.com/jquery">jQuery</a>
</nav>

0 comments:

Post a Comment