Image tag and path
Directory folder: ordinary folders, stored inside page we do need the relevant material, such as html files, pictures, etc.
Root: Open the first layer is the root directory folder
path
relative path
Directory path to the location where the reference file as a reference base, and build out
In simple terms, the picture relative to the HTML page
Relative path classification symbol Explanation With a path The image file is located in an HTML document with, such as <img src = "badidu.gif" /> Under a Path / The image file is located in an HTML document, such as <img src = "imags / badidu.gif" /> On a path ..、 The image file is located on an HTML document, such as <img src = "../ badidu.gif" />
- Absolute path
- It refers to the absolute position of the directory, directly to the target location, usually the path from the beginning of the letter
Hyperlink label
- In the HTML tags, <a> tag defines a hyperlink, the role is a page from another page links.
- Hyperlink syntax
<a href="跳转目标" target="目标窗口的弹出方式">文本或图像</a>
Attributes | effect |
---|---|
href | url address specifies the link target, (must attribute) when the application for the label attribute href attribute, he has a hyperlink function |
target | Used to specify the linked pages Open, which _self is the default value, ** _ blank ** open in a new window |
- Hyperlinks classification
- External links: for example, <a href=" http://www.baidu.com "target="_blank"> Baidu </a>
- External links must start with http: // begin
- Internal links: interconnection between internal pages of the site, a direct connection to the internal name of the page, such as <a href="index.html"> Home
- Air connection: If you did not determine the link target, <a href="#"> Home </a>
- Download Link: href if there is a file or archive, it will download the file. Address link is a file, .exe, or zip and other archive form
- Links page elements: the various web page elements, such as text, images, tables, audio, video, and so can add a hyperlink
- Anchor link: quickly navigate to a location on the page
- In the text of the href attribute is connected, is provided in the form attribute value # name, such as the second current </a> <a href="#two">
- Find the target position of the label, which just added an id attribute = name, such as <h3 id = "two"> in the second quarter introduction </ h3>
- External links: for example, <a href=" http://www.baidu.com "target="_blank"> Baidu </a>
Note
Add some html document easier to read and understand but do not need to display the comment text on the page, you need to use comment tags
- Format: <- -!>
Special characters
In html page, some special symbols difficult or inconvenient to directly, in which case we can use the following characters to replace
Special characters | description | Character code |
---|---|---|
Whitespace | | |
< | Less than sign | < |
> | Greater than sign | > |
& | with | & |
¥ | Renminbi | &yem; |
© | copyright | © |
® | Trademark | ® |
℃ | Celsius | & You; |
± | Positive and negative | ± |
* | title | × |
/ | ÷ | ÷ |
² | square | ² |
m³ | cube | ³ |