Summary of learning about HTML tags and basic elements
1. Elements and tags in HTML
The element is an inclusive range defined by a single or a pair of tags. A label is a string with a less than sign (<) and a greater than sign (>) on the left and right respectively. The start tag refers to a tag that does not start with a slash (/) and contains a list of allowed attribute-value pairs. The closing tag is a tag that begins with a slash (/). For example:
Connection
2. Four forms of HTML elements
Empty element
Empty element with attributes
Element with content
Elements with content and attributesConnection
To summarize the above examples
//Start symbol. It can also be parsed if there is no browser
##
//Start document headerMy name is cauthy!/ /Start the title of the document
//End the head of the document
//Start Document body
Hello World!//Content displayed by the browser
//End document body
//End HTML document
3. Tags related to paragraph control
indicates linebreak Function: line break
静夜思 静夜思
床前明月光,疑是地上霜。举头望明月,低头思故乡。
4. Tags related to text display
##
< ;fontsize=”n” color=””>…: used to set the font, size represents the font size, n can be an integer from 1 to 7, the larger the number, the larger the displayed font.
…: Set the text to be bold
…: Set the text to be italic
5. How to enter special charactersIn HTML documents, symbols such as non-breaking spaces, carriage returns, HTML reserved words, and some characters that do not exist in the keyboard need to be quoted. There are two types of reference in HTML: character reference and entity reference.
Character references and entity references both start with an & and end with a semicolon (;). If you are using a character reference, you need to add a # after &, followed by the decimal code or hexadecimal code of the required character (the encoding of characters in the ISO 10646 character set). If you are using an entity reference, write the character mnemonic after the &.
In HTML, spaces can be entered using full-width spaces.
6. Comments in HTML
7. Class table - Create a numbered listUse the
- and
- tags to create a numbered list. You can use the type attribute to specify the type of numbering system, A (A, B, C), a (a, b, c), I (III III), i (i ii iii) 1 (1, 2, 3) default
Use the start attribute in the- tag to set the starting sequence number.
- tag to change the numbering order in the list.
Create bulleted lists using the- and
- tags. The type attribute in Ul can be, disc (solid circle) square (solid square) circle (empty circle)
Use- and
- tags to create unsigned lists, use
- ;Tag substitution
- creates an indented list.
Use the- and
- tags simultaneously in the
- element to create a term list. A list item in a term list consists of two parts, the term and its description. The term is specified by the
- tag, and the description is specified by the
- tag.
- Mathematics
Chinese - Physics
- Physics
- Mathematics
- Chinese
- Physics
< /ul>- Mathematics
- Chinese
- Physics
- Chemistry
- Mathematics
8. Table
The table uses…< /table>, where border is the width of the table, and the default is 0, which means the width of the table is not displayed.
… : Used to define the title of the table…: The attribute align specifies the horizontal direction of this row For its method, you can specify the vertical alignment method for leftcenter right .valign, which can be top, middle, bottom … : used to set the header;... : used to define cells表格 考试成绩 语文 数学 英语 80 70 60 60 70 80 9. Form creation
- Mathematics
- tags. The type attribute in Ul can be, disc (solid circle) square (solid square) circle (empty circle)
Use the value attribute in the - tag to change the numbering order in the list.