Using IDs Within the Same Doc : Anchor name « Tags « HTML / CSS






Using IDs Within the Same Doc

 

<?xml version"1.0" encoding="UTF-8"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
  <head>
    <title>Using IDs Within the Same Doc</title>
  </head>
  <body>
    <p>
      <a id="top">
        Line 1<br />
        Line 2<br />
        Line 3<br />
        Line 4<br />
        Line 5<br />
        Line 6<br />
        Line 7<br />
        Line 8<br />
        Line 9<br />
        Line 10<br />
        Line 11<br />
        Line 12<br />
        Line 13<br />
        Line 14<br />
        Line 15<br />
        Line 16<br />
        Line 17<br />
        Line 18<br />
        Line 19<br />
        Line 20<br />
        Line 21<br />
        Line 22<br />
        Line 23<br />
        Line 24<br />
        Line 25<br />
        Line 26<br />
        Line 27<br />
        Line 28<br />
        Line 29<br />
        Line 30<br />
        Line 31<br />
        Line 32<br />
        Line 33<br />
        Line 34<br />
        Line 35<br />
        Line 36<br />
        Line 37<br />
        Line 38<br />
        Line 39<br />
        Line 40<br />
        Line 41<br />
        Line 42<br />
        Line 43<br />
        Line 44<br />
        Line 45<br />
        Line 46<br />
        Line 47<br />
        Line 48<br />
        Line 49<br />
        Line 50<br />
    </p>
    <p>
      <a href="#top">Return to top</a>
    </p>
  </body>
</html>

 








Related examples in the same category

1.internal page links
2.Internal Linking
3.A link to a specific part of the page