HTML5 Learning Notes -2.html Basics

Source: Internet
Author: User

1.HTML marker Type

(1) Container tag: Paired start tag with end tag < start tag >...</end tag >

(2) Single tag: only start tag without end tag < single tag >

The composition of the 2.HTML:

<!DOCTYPE HTML><HTML><Head><title>Title</title>//head</Head><Body>//body</Body></HTML>

<title></title> Tags: used to describe the title of the page, which is displayed in the title bar of the browser

<body></body> Tags: Place the contents of a Web page directly on the page

3. Tag attributes: Some headings can be added with attributes to change how they appear on a Web page, attributes are placed directly within the opening tag, and are separated by spaces if more than one attribute is present

Example:

< start Tag Property name 1= Set value 1 property name 2= Set value 2 ...>

4.HTML4 can use the <div> tag to develop the page Structure ID property name, HTML5 Unified the markup of the Web page schema, with some easily recognizable semantic tags instead

Mark Description
Display site name, subject, or primary information
<nav> Web site's Connection menu
<aside> For sidebar
<article> Used to define the main content area
<section> For chapters or paragraphs
<footer> In the footer, used to place the copyright notice, author and other information

Cases:

<Body>    <Header>Website theme</Header>    <nav>Connection Menu</nav>    <article>Main content< Section>Chapter paragraphs</ Section>    </article>    <aside>Side bar</aside>    <Footer>Footer</Footer></Body>

5. Standard HTML files must use the standard specification used by the DOCTYPE declaration in the Pre-file section

DOCTYPE declaration in HTML5: <! DOCTYPE html>

6. Language and Encoding type:

Language declaration method: in

Web page encoding declaration: <meta charset= "GB2312" >

Note: GB2312 is Simplified Chinese code, only support Simplified Chinese, UTF-8 is International code, support multiple languages, not prone to garbled problems

Web page encoding declaration is consistent with the encoding format when you save the file

HTML5 Learning Notes -2.html Basics

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.