HTML basic tutorial tag format
HTML tags are divided into two categories
1. Bilateral tags
Bilateral tags refer to the beginning and Closing tag, the content is placed between the opening and closing tags. For example: <b>Content</b>
Syntax format: <Tag attribute 1 = "Value 1" Attribute 2 = "Value 2" >Content</Tag>
Popular understanding of "property": a thing always has some characteristics, weight, volume, etc. This is the "property" of a thing
Let's take a look at the example and observe the <font> tag
<!DOCTYPE HTML> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <title>php.cn</title> </head> <body> <h1>欢迎加入php.cn</h1> <font size="6" color="red">看看我有什么特别的</font></font> </body> </html>
2. Unilateral tags
Unilateral tags only have a start tag but no end tag. Unilateral tags generally have no content. For example: <br>
<!DOCTYPE HTML> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <title>php.cn</title> </head> <body> <h1>欢迎加入php.cn</h1> <br><br><br> <font size="6" color="red">再看看我有什么特别的</font> <br><br><br> <font size="6" color="red">再看看我有什么特别的</font> </body> </html>
Unilateral tags generally serve a special function.
There are more than 10 commonly used unilateral tags.
Syntax format: <Tag Attribute 1 = "Value 1" Attribute 2 = "Value 2">