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 ways:
- To create a link to another document, by using the href attribute
- To create a bookmark inside a document, by using the name attribute
HTML Link Syntax
The HTML code for a link is simple. It looks like this:
<a href="url">Link text</a> |
The href attribute specifies the destination of a link.
Example
<a href="http://www.w3schools.com/">Visit W3Schools</a> |
which will display like this:
Clicking on this hyperlink will send the user to ' homepage.
Tip: The "Link text" doesn't have to be text. You can link from an image or any other HTML element.
HTML Links - The target Attribute
The target attribute specifies where to open the linked document.
The example below will open the linked document in a new browser window or a new tab:
Example
|
HTML 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.
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.
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.
Example
A named anchor inside an HTML document:
<a name="tips">Useful Tips Section</a> |
Create a link to the "Useful Tips Section" inside the same document:
<a href="#tips">Visit the Useful Tips Section</a> |
Or, create a link to the "Useful Tips Section" from another page:
<a href="http://www.w3schools.com/html_links.htm#tips"> Visit the Useful Tips Section</a> |
Basic Notes - Useful Tips
Note: Always add a trailing slash to subfolder references. If you link like this: href="http://www.w3schools.com/html", you will generate two requests to the server, the server will first add a slash to the address, and then create a new request like this: href="http://www.WORLDHACKERZ.TK/html/".
Tip: Named anchors are often used to create "table of contents" at the beginning of a large document. Each chapter within the document is given a named anchor, and links to each of these anchors are put at the top of the document.
Tip: If a browser does not find the named anchor specified, it goes to the top of the document. No error occurs.
honest hackerz
video
Labels
- antivirus an internet security
- BACKUP AND RECOVERY TOOLS
- BASIC TRICKS OF PC HACKING
- Best Spywares
- BLACK BERRY
- BLOGGER TIPS
- Change Your Ip adress
- Check Online that how many Sims are against your CNIC.
- COLLAGE SERVER HACKING
- COMPUTER HACKING
- COMPUTER PLAYERS
- COMPUTER SOFTWARES
- COOKIES STEALING
- COOL TIPS
- Cracking Kit 2012
- crypters and binders
- E BOOK TUTORIALS
- E MAIL AND SMS BOMBER
- FACEBOOK HACKING
- FACEBOOK SKINS
- File Sonic premium account
- Get someones ISP password
- GRAPHICS
- HACK PASSWARDS
- HACK ADMIN PASSWARD
- Hack Any Facebook Account
- Hack Computer using ip Adress
- HACK PC BY DORK
- HACK PREMIUM ACCOUNTS
- HACKED EMAIL RECOVERY
- HACKING
- HOT FILE PREMIUM ACCOUNTS
- How To Recover Deleted File
- IP TRACING
- IPHONE SOFTARES
- JAZZ
- LATEST
- LATEST I PHONES
- LEARN BASIC HTML
- Make Mozilla 10x Times Faster
- MOBILE AT
- MOBILE PRICES
- MOBILE SOFTWARES
- NOKIA
- Nokia Secret Code's
- NOKIA SOFTARES
- Operate Firefox faster
- ORKUT HACKING
- PACKAGES
- PC HACK
- PC PROTECTION
- Q MOBILES
- Remove Bios Password
- Reset Windows Password
- Restore Firefox Passwords
- SAMSUNG
- See passwords behind stars
- Speed Up Your Bandwidth By 30%
- Stealth Crypter V3 Private
- SUPER FAST BROWSING
- Transfer your Photos to pencil sketch
- VIDEO EDITING
- VIRUSES
- WEBSITE HACKING
- WINDOWS 7 HACK
- Windows XP Secrets
- wireless hacking
sponsers
Blog Archive
-
▼
2011
-
▼
May
-
▼
May 10
- BASIC HTML CH # 1
- BASIC HTML CH # 2
- BASIC HTML CH # 3
- BASIC HTML CH # 4
- BASIC HTML CH # 5
- BASIC HTML CH # 6
- BASIC HTML CH # 7
- BASIC HTML CH # 8
- BASIC HTML CH # 8
- BASIC HTML CH # 9
- BASIC HTML CH # 9
- Headings are important in HTML documents.HTML Hea...
- BASIC HTML CH # 10
- BASIC HTML CH # 11
- BASIC HTML CH # 12
- BASIC HTML CH # 13
- BASIC HTML CH # 14
- BASIC HTML CH # 14
- BASIC HTML CH # 14
- BASIC HTML CH # 14
- BASIC HTML CH # 14
- BASIC HTML CH # 19
- BASIC HTML CH # 15
- BASIC HTML CH # 16
- BASIC HTML CH # 16
- BASIC HTML CH # 17
- BASIC HTML CH # 18
-
▼
May 10
-
▼
May