SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Wizard Wolf_22's Avatar
    Join Date
    Jul 2005
    Posts
    1,710
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question What does this do?: <a href="#skipnav">

    I was looking at the source code to a site just now, and saw this... What is it? First time I've ever seen it... Is it importing some sort of thing as some sort of formatting or something???

    Thanks

  2. #2
    Is Still Alive silver trophybronze trophy RetroNetro's Avatar
    Join Date
    Jul 2003
    Location
    Texas
    Posts
    6,883
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Well for accessibility it is good to offer the option to skip past the menu to the main content.

    here is more... http://diveintoaccessibility.org/day...ion_links.html

  3. #3
    SitePoint Author silver trophybronze trophy

    Join Date
    Nov 2004
    Location
    Ankh-Morpork
    Posts
    12,158
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    It's a link to a specific position within the same page. That position is marked up either like this:
    Code:
    <a name="skipnav"></a>
    or using an id attribute on any element:
    Code:
    <h2 id="skipnav">Main Content</h2>
    The former is deprecated in XHTML 1.1, but the latter won't work in pre-HTML4 browsers.

    From the looks of it, this is on a page where the navigation menu precedes the main content. To help people with screen readers, or people who prefer to navigate by keyboard, the author provides a 'skip' link to jump past the menu and get straight to the content.
    Birnam wood is come to Dunsinane

  4. #4
    SitePoint Wizard Wolf_22's Avatar
    Join Date
    Jul 2005
    Posts
    1,710
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Okay. Thanks guys.


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
  •