An HTML is a markup language for making Web sites
Second, the basic HTML syntax
- HTML tags
HTML tags are the most basic unit and the most important part of HTML.
Usually start with the sharp corner, < and end >
There are two types of labels (paired and unpaired)
Double label: (paired) < tag name > content </Tag name >
such as:<body></body>
Single label: (unpaired):< tag name/> or < tag name >
such as:<meta/><br/>
Labels are case-insensitive <body> and <BODY> are the same as the recommended use lowercase
HTML tags and attributes are not case-sensitive
2. HTML Tag Properties
HTML attributes typically appear in the HTML start tag as part of the HTML tag
There are attributes in the tag that contain some extra information property values must be double quotes ""
You can have more than one property in a label
The composition of the property: Property name = "Property value"
Syntax format:
Single attribute
< Tag Name Property name = "attribute value" ></tag name >
< Tag Name Property name = "attribute value"/>
Multi-attribute
< Tag Name Property Name = Property Value Property Name = Property Value Property Name = property value ></Label name >
< Tag Name Property Name = Property Value Property Name = Property Value Property Name = property value/>
3.HTML Code format
Any spaces and carriage returns do not play any role in the code.
For typesetting
4. Color settings in HTML
A) All in English: Red green yellow white blue black pink purple .....
b) using a six-bit hexadecimal number
#000000-#ffffff
Please take the # number when you write the color value
5. HTML annotations and document declarations
Features of annotations
A. Comments are not displayed on the browser
B. Annotations to the Code
C. Annotations facilitate team development
D. Annotations are used to quickly restore memory
E. Annotations cannot be nested
Document Declaration
<! DOCTYPE HTML >
6 Theme Structure
7 entities (special characters)
< <
> >
Space
©?
¥ ¥
" ‘’
8. Head section Element
Title---Represents the header of an HTML document
Meta---Represents the name and content used to define file information
Link---Use this tag when declaring an external resource in a document
Style---When using a stylesheet in a document
Script---When using JavaScript in a document
Base converts a relative address to an absolute address
<!--convert a relative path to an absolute path--
<base href= "http://www.baidu.com" >
Relative path
./css.css
Start with the content of your current location
For example: I'm in the 101 Live room
./Current Location
.. /Parent Directory
Absolute path
Find the tail from the beginning
For example: Earth China Beijing changping Huilongguan Yu Rong Education Park OTO Live Room 101
Http://www.baidu.com
9. Format label
①<br/> Line Wrapping Label
②
③<p></p> paragraph Labels
④<pre></pre> Display labels in the original format
⑤<li></li> each list label
⑥<ul></ul> unordered List
⑦<ol></ol> ordered list
10. Text Labels
-
- <i></i> Italic Labels
- <u></u> Underline labels
- <b></b> Font Bold Label
- <sub></sub> Subscript Font Labels
- <sup></sup> Superscript Font Labels
- <em></em> emphasis is usually italic
- <strong></strong> emphasis is usually in bold words
- <small></small> Small Font Labels
- <big></big> Large Font Labels
- <tt></tt> Typewriter Fonts
HTML5 01 with Notes