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>

Related Posts:

  • CSS3 CSS has evolved over time from CSS1 to CSS2(which are the current standard) to CSS3(which is still in development.) CSS3 is the latest standard of CS… Read More
  • CSS Links Links are found in every document. Links are used to click their way from one page to another page. With CSS, we can style links to make them decorat… Read More
  • HTML5 HTML5 is the latest version of HTML language. HTML5 was created to replace HTML 4, XHTML, and the HTML DOM Level 2. It is the fifth standard of the H… Read More
  • Introduction to CSS CSS is used to control the style and layout of multiple web pages. It defines how to style HTML elements. An HTML element can be displayed with diffe… Read More
  • Bootstrap Website Creating a website with Bootstrap is easy and fun. If you know HTML and CSS or have a basic knowledge to code them, then you wont have much a problem… Read More

0 comments:

Post a Comment