<a> Boby part of the label - HTML

 Essays and records to facilitate their access to fellow travelers.

#------------------------------------------------I ------------------------------------------- dividing line is a shame

<a> label is mainly used to make a hyperlink to jump, can not be submitted to the database, you can also do anchor, <a> tag is the tag line

<a> hyperlink tag of

 

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>input系列</title>
</head>
<body>
    <a href="http://www.baidu.com">百度</a>
</body>
</html>

 

The results show:

Click on Baidu will jump to Baidu Home

<a> anchor tag of

It is used to anchor the consent of the page jump to do, and about the same directory, anchor needs an anchor, with ID achieve

 

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>input系列</title>
</head>
<body>
    <a href="#i1">第一章</a>
    <a href="#i2">第二章</a>
    <a href="#i3">第三章</a>
    <a href="#i3">第四章</a>
    <div id="i1"> first chapter </ div>"height: 600px;"= style
    <div ID ="I2 " style = " height: 600px; " content> Chapter II </ div> 
    <div ID = " I3 " style = " height: 600px; " > third chapter </ div> 
    <div ID = " I4 " style = " height: 600px; " contents> Chapter IV </ div> 
</ body> 
</ HTML>

 

By anchor id to the associated attributes, id attribute can not be repeated

The results show:

Such anchor on the well, click on the second chapter will jump directly to the second chapter

 

Guess you like

Origin www.cnblogs.com/lirongyang/p/11250696.html