Hyperlinks allow visitors to navigate between pages by clicking on words, phrases and images. This allows you to create hyperlinks using text and images available in your webpage.
When you move the cursor over a link in a Web page, the arrow will turn into a little hand. Links are specified in HTML using the <a> tag.
The <a>tag can be used in two ways:
- To create a link to another document using the href
- To create a bookmark in a document with the name attribute
<a href="http://www.w3schoolss.blogspot.com/">Learn HTML Online</a>
which will display like this
Learn HTML Online
Following are most frequently used attributes for <a> tag.
- href: Specifies the URL of the target of a hyperlink. Its value is a valid document URL, absolute or relative, including a fragment identifier or a fragment of JavaScript code.
- target: specify where to display the contents of a selected hyperlink. If set to "_blank" then a new window will be opened to display the loaded page, if set to "_top" or "_parent" then same window will be used to display the loaded document, if set to "_self" then loads the new page in current window. By default its "_self".
- event: attributes like onClick, onMouseOver etc. are used to trigger any Javascript of VBscript code.
No comments:
Post a Comment