Hyperlink imple...LOGIN

Hyperlink implementation bookmark

To implement bookmarks, you need to understand what an anchor is. An anchor is an anchor attached to a ship. After the anchor is dropped, the ship will not easily drift away or get lost. In fact, anchors are used to jump to different locations within a single page. Some places are called bookmarks. The tag involved is of course the < a> tag. The name attribute of the hyperlink tag is used to define the name of the anchor. One page can define multiple anchors, and the href attribute of the hyperlink can be used to jump to the corresponding anchor based on the name. Implement the jump as follows:

<a href="#跳转目的地名称">跳转起始字符</a>
...
...
...
<a name="跳转目的地名称">跳转目的地字符</a>

Let’s implement the specific implementation below:

<html>
    <head>
    <title>HTML</title>  
    </head>  
<body style="font-size:20px">
    <p style="text-align:center">网页书签</p>
    <p>
    <a href="#c1">网页一</a>
    </p>
    <p>
    <a href="#c2">网页二</a>
    </p>
    <p>
    <a href="#c3">网页三</a>
    </p>
    <p>
    <a href="#c4">网页四</a>
    </p>
    <p>
    <a href="#c5">网页五</a>
    </p>
    <h1><a name="c1"></a>网页链接一</h1>
    <p>内容</p>
    <p>lalalaalalal</p>
    <p>lalalaalalal</p>
    <h1><a name="c2"></a>网页链接二</h1>
    <p>lalalaalalal</p>
    <p>内容</p>
    <p>lalalaalalal</p>
    <h1><a name="c3"></a>网页链接三</h1>
    <p>内容</p>
    <p>lalalaalalal</p>
    <p>lalalaalalal</p>
    <h1><a name="c4"></a>网页链接四</h1>
    <p>内容</p>
    <p>lalalaalalal</p>
    <p>lalalaalalal</p>
    <h1><a name="c5"></a>c网页链接五</h1>
    <p>lalalaalalal</p>
    <p>lalalaalalal</p>
    <p>内容</p>
    </body>
</html>

QQ截图20161206112015.png

Click to implement the jump

Next Section
<html> <head> <title>HTML</title> </head> <body style="font-size:20px"> <p style="text-align:center">网页书签</p> <p> <a href="#c1">网页一</a> </p> <p> <a href="#c2">网页二</a> </p> <p> <a href="#c3">网页三</a> </p> <p> <a href="#c4">网页四</a> </p> <p> <a href="#c5">网页五</a> </p> <h1><a name="c1"></a>网页链接一</h1> <p>内容</p> <p>lalalaalalal</p> <p>lalalaalalal</p> <h1><a name="c2"></a>网页链接二</h1> <p>lalalaalalal</p> <p>内容</p> <p>lalalaalalal</p> <h1><a name="c3"></a>网页链接三</h1> <p>内容</p> <p>lalalaalalal</p> <p>lalalaalalal</p> <h1><a name="c4"></a>网页链接四</h1> <p>内容</p> <p>lalalaalalal</p> <p>lalalaalalal</p> <h1><a name="c5"></a>c网页链接五</h1> <p>lalalaalalal</p> <p>lalalaalalal</p> <p>内容</p> </body> </html>
submitReset Code
ChapterCourseware