HTML5 Elements and Basic grammar

Source: Internet
Author: User
Tags closing tag

Transferred from: http://www.cnblogs.com/Sivan/p/5727083.html

HTML5 Elements and Basic grammar

HTML tags
Start tag (opening tag): Open tag
End tag (closing tag): Closed label


Elements
Definition: HTML element refers to the code from the start tag to the end tag (the element starts with the start tag and terminates with the sleepover tag)
Element content: The content of an element refers to the content between the start tag and the end tag

Features of the element:
1, most HTML elements can be nested (including other HTML elements)
2,html document has nested HTML element composition
3, do not forget the end tag, future HTML version does not allow to omit the end tag
4, empty HTML element
5, HTML elements without content are called empty contents of the element, and empty elements are closed in the start tag
Attention:
The difference between empty elements and empty content: The start and end tags of an empty element are the same, and the emphasis is on the label. Empty content refers to content within an element that is empty and focused on content.

HTML BASIC structure
<!doctype Html>: Not a label, just used to declare help browser correctly realistic Web page
The <meta> tag is always in the head element, and the tag provides metadata about the HTML document
<style> tags for defining style information for HTML documents
<title></title> define the title of the document
The text between <body></body> is the content of Web courseware
Text description page between

HTML properties
HTML tags can have properties, and properties provide more information about HTML elements
Property always appears as a name/value pair
Property values should always be enclosed in parentheses, and double quotes are the most common, but using single quotes is no problem

HTML annotations
You can insert comments in your code to improve the readability of your code, and comments are not displayed on the page, and the browser ignores them
Format:<!--This is a comment-->

1 <!doctype html> 2 

HTML5 Elements and Basic grammar

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.