internal page links : Anchor name « Tags « HTML / CSS






internal page links

 

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="content-type" content="text/html; charset=utf-8" />
    <title></title>
</head>
<body>
    <ul id="questions">
        <li><a href="#answer1">Question one</a></li>
        <li><a href="#answer2">Question two</a></li>
        <li><a href="#answer3">Question three</a></li>
    </ul>

    <p style="height: 1000px;"><!-- spacer --></p>

    <p id="answer1">The answer to question 1!</p>
    <p><a href="#questions">Back to questions</a></p>
    <p id="answer2">The answer to question 2!</p>
    <p><a href="#questions">Back to questions</a></p>
    <p id="answer3">The answer to question 3!</p>
    <p><a href="#questions">Back to questions</a></p>

    <p style="height: 1000px;"><!-- spacer --></p>

</body>
</html>

 








Related examples in the same category

1.Internal Linking
2.Using IDs Within the Same Doc
3.A link to a specific part of the page