Internet is collection of link.
Link attribute is most important attribute in a webpage.
<a> tag is used to define a link in webpage. with <a> you use href attribute to define destination of link
HTML Link Syntax
<a href="destinationurl">Text to display</a>
Attributes are provided with start tag of HTML element.
|id||ID attribute is used to create bookmark within a HTML webpage.||</p>|
|target||target="_new" opens link in new tab/window.||</p>|
<a href="#section2">Go to Section 2</a> takes user to section 2 marked in same webpage.
<a href="http://www.htmll5.com/mypage.html#section2">Go to Section 2</a> takes user to section 2 from another webpage.
By default, links will appear as follows in all browsers:
- An unvisited link (link that is not clicked) is underlined and shown blue
- A visited link (clicked) is underlined and purple
- An active link is underlined and red
You can create your own style to override above behavior/