Home > Article > Web Front-end > A brief overview of Html5 syntax and rules
1. Html5 is not case-sensitive,
This is my
2. Html5 omits the slash that closes empty elements; empty elements are elements that do not have nested content, for example:
3. Grammar rules for attributes, As long as the attribute value does not contain restricted characters such as (> = or spaces), quotation marks are not required.
For example:
It’s okay to have only attributes but no names and no attribute values.
PS: If you can do the following, it can basically be regarded as a good HTML5 style
1. Although,, is dispensable, not using it just represents a style. However, using it will help separate the page content from other information, so it should include these three elements.
2. Labels should be all lowercase.
3. Add quotation marks for attribute values. The reason for adding quotation marks is to prevent making some low-level mistakes. Sometimes an inadvertent mistake or an invalid character will destroy the entire page.
The above is a brief overview of Html5 syntax and rules. For more related articles, please pay attention to the PHP Chinese website (www.php.cn)!