Results 1 to 4 of 4

Thread: why this symbol used in web address?

  1. #1
    Join Date
    Feb 2009
    Posts
    156
    Thanks
    0
    Thanked 4 Times in 3 Posts

    Default why this symbol used in web address?

    many a times i noticed a # sign in a web address, i dont know what its meaning in a web address? does it used for link with in a page only or it has any other meaning too?

    for example
    www.orkut.com/main.aspx#home

  2. #2
    Join Date
    May 2007
    Location
    Boston,ma
    Posts
    2,127
    Thanks
    173
    Thanked 207 Times in 205 Posts

    Default

    That says go to the section of a page, in this instance home.

  3. #3
    Join Date
    Oct 2008
    Location
    Sweden
    Posts
    2,023
    Thanks
    17
    Thanked 319 Times in 318 Posts
    Blog Entries
    3

    Default

    It can be used to link to an anchor on the page. For instance, maybe you have a new chapter about half-way down the page that you want to link to:
    HTML Code:
    <a name="chocolate">Sweet chocolate</a>
    The link to it would be http://www.example.com/index.html#chocolate or if you link from inside the page:
    HTML Code:
    <a href="#chocolate">Jump to the awesome part!</a>
    When the user click on either of the links, the browser window will be scrolled down to where the anchor links is.

    Good luck!
    Eddy Proca
    I love Dropbox. Get it through my girlfriend's referral link (I reached my limit) and both you and her get 500 MB extra! Thanks and you're welcome!

  4. #4
    Join Date
    Jul 2006
    Location
    just north of Boston, MA
    Posts
    1,806
    Thanks
    13
    Thanked 72 Times in 72 Posts

    Default

    Quote Originally Posted by Snookerman View Post
    It can be used to link to an anchor on the page. For instance, maybe you have a new chapter about half-way down the page that you want to link to:
    HTML Code:
    <a name="chocolate">Sweet chocolate</a>
    The link to it would be http://www.example.com/index.html#chocolate or if you link from inside the page:
    HTML Code:
    <a href="#chocolate">Jump to the awesome part!</a>
    When the user click on either of the links, the browser window will be scrolled down to where the anchor links is.

    Good luck!
    Pssst, should use the id attribute, not name; by doing this you are able to provide a direct link to any tag, not just the anchor tag.

    Code:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
    <html>
    <head>
    <title>TITLE</title>
    </head>
    <body>
    
    <p style="height:600px">This is some text</p>
    <p id="aa">ANCHORED</p>
    <p style="height:10000px">more text</p>
    <p><a href="#aa">Link to ANCHORED</a></p>
    
    </body>
    </html>

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •