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

A brief overview of Html5 syntax and rules

黄舟
黄舟Original
2016-12-16 10:10:441223browse

 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)!


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