Basic HTML knowledge
I. 1. What is HTML? hypertext markup language is composed of tags and content (tags and nodes.
2. HTML5 document comments: <! -- Comment content -->
3. HTML tags: they are enclosed by "<" ">.
Dual tags (in pairs): <Tag Name>... </Tag Name>
Single tag (not paired): <Tag Name/>
Lowercase letters are recommended.
4. HTML tag components: attributes and entities
The attribute is composed of both the attribute name and value: <Tag Name attribute name 1 = "value" attribute name 2 = "value" · attribute name N = "value"> </Tag Name>
HTML Entity "<": & lt
">": & Gt
"Space": & nbsp;
"Quotation marks": & quot
"&": & Amp
5. Main Structure of HTML files
1 <! DOCTYPE html> <! -- Type description: The DOCTYPE Declaration must be placed at the top of every HTML document, on top of all codes and identifiers. --> 2
Or the css style and js are all written on the page.
1 <! DOCTYPE html> 2
6. Color in HTML: ① Color Words: red, blue, and black
② Six-digit hexadecimal #000000 -- # FFFFFF (the screen color extraction tool that can be extracted or ColorSpy in the drawing) the first two are red, the middle is green, and the last two are blue.
For example, the white color is # FFFFFF (which can be abbreviated as # FFF), and the red color is #000
Ii. Format Text tags in HTML
1. Text labels
① <Br/> line feed
② <P> · </p> segment change
③ <I> · </I> Italic
④ <I> · </I> emphasize Italic
⑤ <B> · </B> bold
⑥ <Strong> · </strong> emphasize bold
7
References <cite> · </cite>
Subscript <sub> · </sub> subscript
Upload <sup> · </sup>
Deleted <del> · </del> strikethrough
Pipeline <bdo> · </bdo> text direction example: <bdo dir = "rtl"> · </bdo> or <bdo dir = "ltr"> · </bdo>
Abbreviation of lifecycle <abbr> · </abbr>
Detail <details> · </details> element details
Details <summqry> · </summqry> contains the title of the details element.
Example 1: 2 <details> 3 <summary> HTML 5 </summary> 4 This document teaches you everything you have to learn about HTML 5.5 </details>
<! -- Result: HTML 5 This document teaches you everything you have to learn about HTML 5. -->
Interval <time >:· · </time> time
Dialog <dialog> · </dialog>
Preserve <pre> preserve the text format in the source code
2. format tags
① <Br/> line feed
② <P> · </p> segment change
③ <Hr/> horizontal line
④ <Font> · </font> font
Example: <font size = "5" face = "arial" color = "red"> A paragraph. </font>
3. List
① <Ul> unordered list example: <ultype="square"> </Ul> type value: discsquare circle
② <Ol> ordered List Example: <oltype="I"> </Ol> type value: A a I I 1
<Olstart="5"> </Ol> start value
③ <Li> list items
④ <Dl> Custom list
<Dt> · </dt> title
<Dd> · </dd> content