The transformation from documents to applications in chapter 1 of HTML5 practice summaries,

Source: Internet
Author: User

The transformation from documents to applications in chapter 1 of HTML5 practice summaries,

 

1. Basic Features of HTML5

1.1 DOCTYPE declaration method

HTML5 declaration format is very simple without the need for DTD and URL

<!DOCTYPE html>

Just put such a statement at the beginning of the document.

1.2 New Elements

Add new elements to represent new semantics. For example, the

1.3 new form features

HTML introduces a new form input type, for example:

Color:

Time:

Month:

Date:

Number:

Range:

In addition to the rich types of input elements, HTML5 also introduces new input element attributes.

For example: autocomplete, autofocus, placeholder, list, etc.

1.4 progress bar measurer foldable content

These are some common display widgets. I personally think that in actual engineering projects, more components are built by myself, and these native small components are not used much.

1.5 micro data

Search engines and browsers can provide more functions through micro-data

2. Advanced features

2.1 HTML Canvas can be used to create a wide range of animations through HTML and JS, replacing the poor implementation methods, such as Flash technology.

2.2 audio and video, the previous implementation method is to support video and audio through third-party plug-ins, but now it can be supported by HTML native. This may be an important reason for HTML5's recent popularity. videos can be easily transmitted on mobile terminals without any third-party plug-ins.

2.3 drag-and-drop feature. Previously, the drag-and-drop feature on the page was implemented through JS. Now, you can implement the drag-and-drop feature by combining the new HTML5 drag-and-drop API.

2.4 use WebSockets to implement two-way communication between the server and the client. This communication method has no HTTP-related overhead and is suitable for fast transmission of small-scale data.

2.5 use the server to send events to implement one-way communication from the server to the client. Using the EventSource interface, your web application can subscribe to a server event stream, which only receives the update messages sent by the server.

2.6 The document can be edited. You can set the contenteditable attribute to make the element editable. Setting the designMode can make the entire document editable.

2.7 Cooki may cause many negative problems. Web Storage dom api is a solution for web applications to replace cookies. This API involves two interfaces: sessionStorage and localStorge.

2.8 use IndexDB to develop offline web applications. When offline, you can call the local IndexDB database for operations. After the database is connected to the network, it is updated to the server through ajax requests.

2.9 Scalable Vector Graphics

 

This series of articles mainly aims to further streamline and refine the html in action content. Summarize the ideas and methods, streamline the content, and further understand the WEB revolution brought about by HTML5 specifications.

 

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.