HTML4与HTML5的区别

来源:互联网 发布:淘宝促销时间表 编辑:程序博客网 时间:2024/05/17 14:26
HTML4与HTML5的区别
1、取消了一些过时的 HTML4的标签
其中包括纯粹显示效果的标记,如<font>和<center>,它们已经被 CSS完全取代。
其他取消的属性:acronym, applet, basefont, big, center, dir, font, frame, frameset, isindex, noframes, strike, tt。

2、添加了一些新的元素
比如:更加智能的表单标签:date, email, url  等;更加合理的标签:section, video, progress, nav, meter, time, aside, canvas等。

3、新的全局属性:id, tabindex, repeat

4、文件类型声明(<!DOCTYPE>)仅有一型:<!DOCTYPE HTML>。

5、新的JS API

全新的文档结构标签:
<body>
<header>header</header>
<nav>nav</nav>
<article>
article
<section>section</section>
</article>
<aside>aside</aside>
<footer>footer</tooter>
</body>


参考文档:
http://www.w3school.com.cn/html5/att_input_type.asp
原创粉丝点击