Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HTML4和HTML5不同点 #16

Open
conan1992 opened this issue Jun 16, 2020 · 0 comments
Open

HTML4和HTML5不同点 #16

conan1992 opened this issue Jun 16, 2020 · 0 comments

Comments

@conan1992
Copy link
Owner

1.声明方面

<!DOCTYPE html>

2.标准方面

不再基于SGML标准;

3.标签方面

引入了<header><footer><aside><section><article><nav><canvas>等标签

废除了一些标签

4.属性方面

增加了一些表单属性, 主要是其中的input属性的增强

<!-- 此类型要求输入格式正确的email地址 -->
<input type=email >
<!-- 要求输入格式正确的URL地址  -->
<input type=url >
<!-- 要求输入格式数字,默认会有上下两个按钮 -->
<input type=number >
<!-- 时间系列,但目前只有 Opera和Chrome支持 -->
<input type=date >
<input type=time >
<input type=datetime >
<input type=datetime-local >
<input type=month >
<input type=week >
<!-- 默认占位文字 -->
<input type=text placeholder="your message" >
<!-- 默认聚焦属性 -->
<input type=text autofacus="true" >

5.存储方面

新增了WebStorage: localstorage和sessionStorage

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant