Chapter 1 basic format-water source

Source: Internet
Author: User
Chapter 4 basic format-original learning points of water:

1. HTML5 document structure
2. Document Structure Analysis
3. Element tags

Lecturer: Li Yanhui

This chapter focuses on the structure of HTML5 documents. These basic elements determine the outline of the HTML document and the initial environment of the browser. Almost all pages must first type these elements.

I. HTML5 document structure
1. Step 1: Open Sublime Text 3 and open the specified folder;
2. Step 2: Save the index.html file to the suffix of the webpage;
3. Step 3: Write the basic HTML5 format.

// Document type declaration// Indicates that the HTML document starts.// Start with containing the document metadata
 // Declare the character encodingBasic Structure// Set the document title// The metadata of the included document ends.// Indicates the HTML document content Baidu // a hyperlink element (TAG)// HTML// Indicates that the HTML document has ended.

Ii. Document Structure Analysis
1. Doctype
Document Type Declaration (Doctype ). It mainly tells the browser the type of the file to be viewed. In the past HTML4.01 and XHTML1.0, it represents the specific HTML Version and style. Currently, HTML5 does not need to express versions and styles.

// Case insensitive

2. html elements
First, the element is the meaning of the tag, and the html element is the html Tag. Html elements are the elements at the beginning and end of a document. It is a dual-label that echoes the head and tail and contains the content. This element has an attribute and value: lang = "zh-cn", indicating that the document uses the simplified Chinese language.

// In English, the value is en.

3. head Element
Used to include metadata content. Metadata includes: , , , Script,

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.