Html5 syntax and rules Overview

Source: Internet
Author: User

Html5 syntax and rules Overview
Html5 is case-insensitive, and the slash that disables null elements is omitted. As long as the attribute value does not contain (> = or space) and other restricted characters, you do not need to add quotation marks. 1. Html5 is case-insensitive,

This is my

2. Html5 omitting the slash that closes the empty element. An empty element is an element that does not nest the content. For example:

3. Attribute syntax rules. As long as the attribute value does not contain (> = or space) and other restricted characters, no quotation marks are required.

For example:

Only attributes with no name and no attribute value are allowed.

PS: if you can do the following, it can be regarded as a good html5 style.

1. Although, and dispensable, not using only represents a style. However, using it will help separate the content of the page from other information, so we should include, and these three elements.

2. All tags are in lower case.

3. Add quotation marks for attribute values. The reason for quotation marks is to prevent some low-level errors. Sometimes, if an invalid character is accidentally incorrect, the whole page will be damaged.
What are the syntax rules of HTML?

[Start] -------- here content --------------- [end]
<Div class = "a"> content </div> <span> ................. </span> <a href = "#"> .............. </a>

Content nesting:
<Div class = "a">
<Span> ...... </span>
</Div>
(Child level, parent level should be distinguished)
Do not understand the append (Typing hard to score)

How to Use HTML5

HTML5 is a collection of new tags, new features, and new standards. The basic format of the document is simple:
<! Doctype html>
<Html>
<Head>
<Title> HTML5 Page </title>
<Meta charset = "UTF-8">
</Head>
<Body>
Your contents
</Body>
</Html>
As for how to use functions such as canvas, websocket, audio, and geolocation, I am not clear about them. Please refer to Baidu html5 for many tutorials. If you want to buy books, Head First HTML5 Programming is a good start

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.