Home >Web Front-end >H5 Tutorial >A brief overview of Html5 syntax and rules

A brief overview of Html5 syntax and rules

PHPz
PHPzOriginal
2016-05-16 15:47:311775browse

Html5 is not case-sensitive and omits the slash closing empty elements. As long as the attribute value does not contain restricted characters such as (> = or spaces), you do not need to add quotation marks

1. Html5 Case-insensitive

2. Html5 omits the slash that closes empty elements; empty elements are elements that do not have nested content, for example:

3. Attribute syntax rules, attribute values As long as it does not contain restricted characters such as (> = or spaces), you do not need to add quotation marks.

For example:

It is 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 the entire content of this chapter. For more related tutorials, please visit Html5 video tutorial!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn