faqts : Computers : Programming : Languages : Html

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

4 of 8 people (50%) answered Yes
Recently 4 of 8 people (50%) answered Yes

Entry

HTML: Link: Page: Local: How to jump to a position in a web page using '#'? [HREF / NAME / <A>]

Oct 26th, 2004 11:20
Knud van Eeden,


----------------------------------------------------------------------
--- Knud van Eeden --- 26 October 2004 - 07:40 pm --------------------

HTML: Link: Page: Local: How to jump to a position in a web page 
using '#'? [HREF / NAME / <A>]

---

Use the combination:

<A
  HREF="<yourfilename>#<yourposition>"
>
 ...
</A>

and

<A
  NAME="#<yourposition>"
>
</A>

---
---

Steps: Overview:

 1. -Put a link similar to the following in the calling source file
     (e.g. example1.htm):

--- cut here: begin --------------------------------------------------

<A
  HREF="example2.htm#example2"
>
 Click on this link to jump to another file 1, position #example1
</A>

--- cut here: end ----------------------------------------------------

 2. -Put a link similar to the following in the destination file
     (e.g. example2.htm):

--- cut here: begin --------------------------------------------------

<A
  NAME="#example2"
>
</A>

--- cut here: end ----------------------------------------------------

 3. -If you then load the file example1.htm, click on that link, you
     will immediately jump to that position in example file2 where you
     have put <A NAME="#example2"> </A>

----------------------------------------------------------------------