Link Code

Discussion in 'HTML' started by Nowhere, Jul 19, 2005.

  1. Nowhere

    Nowhere Guest

    What is the code for a link to a specific part of another page? Thanks.
     
    Nowhere, Jul 19, 2005
    #1
    1. Advertising

  2. Nowhere

    Steve Pugh Guest

    Nowhere wrote:
    > What is the code for a link to a specific part of another page? Thanks.


    The link:
    <a href="otherpage.html#foo">link text</a>

    The other page:
    <a name="foo">anchor</a>
    or
    <h1 id="foo">heading</h1>

    name is supported by all browsers, id si supported by all modern
    browsers (even IE). You don't need to use <h1>, almost any element can
    take an id.

    If the other page is not under control and if there are no names or ids
    already in it then you can't link to specific regions.

    Steve
     
    Steve Pugh, Jul 19, 2005
    #2
    1. Advertising

  3. Nowhere

    Spartanicus Guest

    "Nowhere" <> wrote:

    >What is the code for a link to a specific part of another page?


    <a href="foo.htm#bar">bar</a>

    In foo.htm: <h2 id="bar">bar</h2>

    --
    Spartanicus
     
    Spartanicus, Jul 19, 2005
    #3
    1. Advertising

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. Kevin Spencer

    Re: Link Link Link DANGER WILL ROBINSON!!!

    Kevin Spencer, May 17, 2005, in forum: ASP .Net
    Replies:
    0
    Views:
    891
    Kevin Spencer
    May 17, 2005
  2. Graham Thomson
    Replies:
    3
    Views:
    487
    Eki Y. Baskoro
    Dec 18, 2003
  3. Dan M
    Replies:
    5
    Views:
    440
  4. kolesdz
    Replies:
    9
    Views:
    547
    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:
    124
    Marina Limeira
    Feb 7, 2006
Loading...

Share This Page