Warning: file_put_contents(/datas/wwwroot/jiajiahui/core/caches/caches_template/2/default/show.php): failed to open stream: Permission denied in /datas/wwwroot/jiajiahui/core/libraries/classes/template_cache.class.php on line 55

Warning: chmod(): Operation not permitted in /datas/wwwroot/jiajiahui/core/libraries/classes/template_cache.class.php on line 56
HTML5有什么新特性 - 源码之家

HTML5有什么新特性

这篇文章给大家分享的是有关HTML5有什么新特性的内容。小编觉得挺实用的,因此分享给大家做个参考。一起跟随小编过来看看吧。

一:新增的功能

更加语义化的元素。 article、footer、header、nav、section

本地化储存。 localStorage 和 sessionStorage

离线应用,离线缓存。 manifest

拖曳以及释放的api。 Drag and drop

媒体播放。 video 和 audio

增强表单控件。 calendar、date、time、email、url、search

地理位置。 Geolocation

多任务。 webworker

全双工通信协议。 websocket

历史管理 history

跨域资源共享(CORS) Access-Control-Allow-Origin

页面可见性改变事件 visibilitychange

跨窗口通信 PostMessage

Form Data 对象

绘画:canvas

二:HTML5移除了那些元素?

纯表现的元素:basefont、big、center、font、s、strike、tt、u

对可用性产生负面影响的元素:frame、frameset、noframes

三:怎么样处理h6新标签的兼容问题

第一可以使用 document.createElement 来创建新标签

使用垫片 html5shiv.js

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

三:怎么样区分HTML和HTML5

很明显的区别就是DOCTYPE声明,h6只需要写<!DOCTYPE> ,而html声明

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

可以根据h6新增的功能元素如canvas来进行判断

感谢各位的阅读!关于HTML5有什么新特性就分享到这里了,希望以上内容可以对大家有一定的帮助,让大家可以学到更多知识。如果觉得文章不错,可以把它分享出去让更多的人看到吧!