Depth understanding of hypertext - HT knowledge of HTML
HT (hypertext) Hypertext With it you can get rid of the shackles of a single page of links to other pages
Use <a> element
Use <a> element creates a hypertext link, a link to another web page.
Structure <a> element
<A href = "links page"> element content </ a>
using the "href" attribute to determine what the page will jump to the page that tells the browser to a linked object file
element content will become clickable web page text
files can be linked in the same folder, or you can link files in different folders
<A> element Example
<a href=“http://www.baidu.com”> baidu</a>
<!-- 点击baidu,将跳转到百度的页面-->
Supplementary about <a> element
In general discharge element content is text, but in fact you can also put pictures by <img> element, click the picture you can jump. Of course, part of the content into the element <p> or <h1> and the like are also possible
Understanding properties
Additional information by using the attribute may specify an element
Writing property
Property name = "attribute value"
Note that you may also see some HTML is not quoted, it is not rigorous in some cases can cause problems
using attributes written at the beginning tag in, <a> element instances href It is a property
Planning text path
Down a link to a folder
With "/" to separate folders at all levels, as indicated direction.html in about folder
<a href="about/direction.html">detailed direction</a>
Link up to a parent folder
With the "..." moved to a folder, when the folder multistage shift needs to be used multiple times ...
The lounge folder (containing lounge.html) have about the folder (containing deriction.html) under with address folders (containing adress.html) at about files, now need to return lounge.html page from adress.html page
<a href="../../lounge.html">back to lounge</a>
Using the <img> element
<Img> element only start flag, which has a relative path src attribute value, similar href attribute
<img src="drinks.gif">
When pointing to a picture of the path is incorrect, you will see a broken image on a web page, you need to plan the same path as the href, fill out the relative path after the equal sign