New HTML5 features: CSS + HTML5 instances

Source: Internet
Author: User

1. New doctype and Character Set

One of the principles of HTML5 is to simplify the complexity, and the doctype on the Web page is greatly simplified.

<!DOCTYPE html>

Character Set Declaration is also simplified:

<meta charset="utf-8">

2. New and Old Elements

HTML5 introduces many new tags, which are divided into seven categories based on different content and types.

3. semantic tags

Semantic tags simplify the design of HTML pages. In the future, search engines will also take advantage of these elements when capturing and indexing webpages.

One of the purposes of html5. Google analyzed millions of pages and found that the common ID names of Div tags are large. For example, many developers prefer to use Div id = "footer" to mark footer content,

Therefore, HTML5 introduces a new set of fragment class elements.

4. HTML5 code sample

<! Doctype HTML> 

Demo:

5. Set the content style in CSS

<! Doctype HTML> 

Demo:

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.