HTML - Links menu

User Tag List

Thread: HTML - Links

Results 1 to 1 of 1
  1. #1
    Nolixz's Avatar ★ Elder ★
    Reputation
    1000
    Join Date
    Oct 2006
    Posts
    1,371
    Thanks G/R
    6/17
    Trade Feedback
    16 (100%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    HTML - Links

    Author: w3schools.com

    The Anchor Tag and the Href Attribute

    HTML uses the <a> (anchor) tag to create a link to another document.

    An anchor can point to any resource on the Web: an HTML page, an image, a sound file, a movie, etc.

    The syntax of creating an anchor:

    HTML Code:
    Code:
    <a href="url">Text to be displayed</a>
    The <a> tag is used to create an anchor to link from, the href attribute is used to address the document to link to, and the words between the open and close of the anchor tag will be displayed as a hyperlink.

    This anchor defines a link to W3Schools:

    HTML Code:
    Code:
    <a href="http://www.w3schools.com/">Visit W3Schools!</a>
    The line above will look like this in a browser:


    Visit W3Schools!


    The Target Attribute

    With the target attribute, you can define where the linked document will be opened.

    The line below will open the document in a new browser window:

    HTML Code:
    Code:
    <a href="http://www.w3schools.com/"
    target="_blank">Visit W3Schools!</a>
    The Anchor Tag and the Name Attribute

    The name attribute is used to create a named anchor. When using named anchors we can create links that can jump directly into a specific section on a page, instead of letting the user scroll around to find what he/she is looking for.

    Below is the syntax of a named anchor:

    HTML Code:
    Code:
    <a name="label">Text to be displayed</a>
    The name attribute is used to create a named anchor. The name of the anchor can be any text you care to use.

    The line below defines a named anchor:

    HTML Code:
    Code:
    <a name="tips">Useful Tips Section</a>
    You should notice that a named anchor is not displayed in a special way.

    To link directly to the "tips" section, add a # sign and the name of the anchor to the end of a URL, like this:

    <a href="http://www.w3schools.com/html_links.asp#tips">
    Jump to the Useful Tips Section</a>

    A hyperlink to the Useful Tips Section from WITHIN the file "html_links.asp" will look like this:

    HTML Code:
    Code:
    <a href="#tips">Jump to the Useful Tips Section</a>
    Basic Notes - Useful Tips

    Always add a trailing slash to subfolder references. If you link like this: href="http://www.w3schools.com/html", you will generate two HTTP requests to the server, because the server will add a slash to the address and create a new request like this: href="http://www.w3schools.com/html/"

    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.

    If a browser cannot find a named anchor that has been specified, it goes to the top of the document. No error occurs.

    ***I DO NOT TAKE CREDITS FOR THIS***



    HTML - Links

Similar Threads

  1. Replies: 2
    Last Post: 04-13-2012, 01:00 AM
  2. Joana video link
    By Dok-121 in forum World of Warcraft General
    Replies: 5
    Last Post: 11-20-2006, 07:39 AM
  3. anybody got links for Emu?
    By Krazzee in forum World of Warcraft General
    Replies: 4
    Last Post: 06-10-2006, 04:49 PM
  4. [Exploit] Warlock: Soul Linked Pets take no damage
    By Matt in forum World of Warcraft Exploits
    Replies: 3
    Last Post: 05-09-2006, 12:01 PM
All times are GMT -5. The time now is 09:33 PM. Powered by vBulletin® Version 4.2.3
Copyright © 2024 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search