a name = ".."> creates an internal hyperlink : Anchor « Tags « HTML / CSS






a name = ".."> creates an internal hyperlink

 
<?xml version = "1.0"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns = "http://www.w3.org/1999/xhtml">
   <body>

      <p><a name = "features"></a></p>
      <h1>The Best Features of the Internet</h1>

      <!-- an internal link's address is "#linkname"         -->
      <p><a href = "#ceos">Go to <em>Favorite CEOs</em></a></p>

      <!-- named anchor -->
      <p><a name = "ceos"></a></p>
      <h1>My 3 Favorite <em>CEOs</em></h1>
   
      <p>

         <!-- internal hyperlink to features -->
         <a href = "#features">Go to <em>Favorite Features</em>
         </a></p>

      <ol>
         <li>B</li>
         <li>S</li>
         <li>M</li>
      </ol>

   </body>
</html>

 








Related examples in the same category

1.Introduction to hyperlinks
2.'link' defines relationship between the current page and external documents
3.A basic link to another page
4.A basic link to an external web site
5.A link with a title attribute
6.A link with white space
7.Anchor element
8.relative link
9.background image, repeat and position for anchor link
10.avoid underlining links
11.Set border for an anchor with
  • under
  • 12.Set text-decoration to none for
    13.Anchor hover image style
    14.Set cursor for anchor link and visted
    15.Set text decoration for anchor
    16.Set background for anchor
    17.Four level nesting for anchor style setting
    18.Using Links - Changing Backgrounds
    19.Using Links with Background Images
    20.Image links
    21.anchor style for removing the underline
    22.Add text decoration for link
    23.Add background image to anchor link
    24.List with anchor
    25.Using images as link anchors
    26.text-decoration, color, background-color for hover anchor