Home >Web Front-end >H5 Tutorial >What are the new features of HTML5? Detailed explanation of new features of HTML5

What are the new features of HTML5? Detailed explanation of new features of HTML5

云罗郡主
云罗郡主forward
2019-01-04 09:41:584679browse


#This article brings you what are the new features of HTML5? A detailed explanation of the new features of HTML5 has certain reference value. Friends in need can refer to it. I hope it will be helpful to you. [Recommended tutorial: Html5 tutorial]

1: New features

More semantic elements. article, footer, header, nav, section

Localized storage. localStorage and sessionStorage

Offline application, offline caching. manifest

Drag and release API. Drag and drop

Media playback. video and audio

Enhanced form controls. calendar, date, time, email, url, search

Geographical location. Geolocation

Multi-tasking. webworker

Full-duplex communication protocol. websocket

History management history

Cross-domain resource sharing (CORS) Access-Control-Allow-Origin

Page visibility change event visibilitychange

Cross-window Communication PostMessage

Form Data Object

Painting: canvas

2: What elements have been removed by HTML5?

Purely expressive elements: basefont, big, center, font, s, strike, tt, u

Elements that negatively impact usability: frame, frameset, noframes

Three: How to deal with the compatibility issue of h5 new tags

First, you can use document.createElement to create new tags

Use the shim html5shiv.js

<!--if lt IE 9]>  
<script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script> 
<![endif]-->

3: How to distinguish between HTML and HTML5

The obvious difference is the DOCTYPE statement. h5 only needs to write 1a309583e26acea4f04ca31122d8c535, while the html statement

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

Can be judged based on the new functional elements of h5 such as canvas




##

The above is the detailed content of What are the new features of HTML5? Detailed explanation of new features of HTML5. For more information, please follow other related articles on the PHP Chinese website!

Statement:
This article is reproduced at:csdn.net. If there is any infringement, please contact admin@php.cn delete