HTML Hyperlinks (Links)
A hyperlink (or link) is a word, group of words, or image that you can click on to jump to a new document or a new section within the current document.
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 way :
- To create a link to another document, by using the href attribute
- To create a bookmark inside a document, by using the name attribute
The HTML code for a link is simple. It looks like this:
<a href="url">Visit me</a>
The href attribute specifies the destination of a link.
Example
Visit MeHTML Links - The name Attribute
The name attribute specifies the name of an anchor.
The name attribute is used to create a bookmark inside an HTML document.
Note:
- The upcoming HTML5 standard suggest using the id attribute instead of the name attribute for specifying the name of an anchor.
- Using the id attribute actually works also for HTML4 in all modern browsers.
- Bookmarks are not displayed in any special way. They are invisible to the reader.
<a name="tips">Useful Tips Section</a>
Create a link to the "Useful Tips Section" inside the same document:
Visit the Useful Tips Section Or, create a link to the "Useful Tips Section" from another page:
<em><a href="http://www.beternak-hamster.blogspot.com/html_links.htm#tips">
Visit the Useful Tips Section</a> </em>
Don't be confused Please
0 comments:
Posting Komentar