Link code

Discussion in 'HTML' started by Starman, Mar 8, 2006.

  1. Starman

    Starman Guest

    I want to place a link within a page (the top) to link to another part of
    the same page (bottom). How do I do this and what is the code?
     
    Starman, Mar 8, 2006
    #1
    1. Advertisements

  2. Starman wrote:

    > I want to place a link within a page (the top) to link to another
    > part of the same page (bottom). How do I do this and what is the code?


    The link at the top:
    <a href="#bottomofthepage">Go to the bottom</a>

    The reference at the bottom:
    <a name="bottomofthepage" id="bottomofthepage"></a>

    It doesn't matter what you name them (replacing "bottomofthepage"), as
    long as they match. And I've provided both the "name" and "id"
    attributes in the second location for backwards compability only. You
    may skip one of these (depending on which doctype you're using).

    --
    Kim André Akerø
    -
    (remove NOSPAM to contact me directly)
     
    =?iso-8859-1?Q?Kim_Andr=E9_Aker=F8?=, Mar 8, 2006
    #2
    1. Advertisements

  3. Starman wrote:

    > I want to place a link within a page (the top) to link to another part of
    > the same page (bottom). How do I do this and what is the code?


    <a href="#id_of_element">foo</a>

    <h2 id="id_of_element">Foo</h2> <!-- doesn't have to be an h2 -->

    --
    David Dorward <http://blog.dorward.me.uk/> <http://dorward.me.uk/>
    Home is where the ~/.bashrc is
     
    David Dorward, Mar 8, 2006
    #3
    1. Advertisements

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Graham Thomson
    Replies:
    3
    Views:
    647
    Eki Y. Baskoro
    Dec 18, 2003
  2. J.Artieda

    link c code with c++ code using g++

    J.Artieda, Apr 9, 2004, in forum: C Programming
    Replies:
    1
    Views:
    531
  3. Dan M
    Replies:
    5
    Views:
    655
  4. kolesdz
    Replies:
    9
    Views:
    782
    Blinky the Shark
    Aug 22, 2007
  5. Marina Limeira

    LINK with another link

    Marina Limeira, Feb 7, 2006, in forum: ASP .Net Web Services
    Replies:
    0
    Views:
    256
    Marina Limeira
    Feb 7, 2006
  6. Andrew
    Replies:
    2
    Views:
    212
    Andrew
    Feb 18, 2009
  7. Blue®
    Replies:
    4
    Views:
    1,227
    Blue®
    Sep 27, 2003
  8. Carl Gilbert

    Link to run script and link to page

    Carl Gilbert, Jan 13, 2004, in forum: Javascript
    Replies:
    3
    Views:
    294
    Michael Winter
    Jan 13, 2004
Loading...