html5

新增元素

<header><nav><section><article><aside><footer>(语义元素)
<source>(媒介元素)<audio><video>
<canvas>
<bdi><dialog><summary><details><figcaption><figure><command><embed>(嵌入的插件)
<progress>(进度条)<time><wbr><rt><meter><mark>(着重)
<ruby><rp>
<datalist>(列表选择)<keygen><output>(新的表单元素)

新增属性

不太重要,举例一些:
draggable(可拖动的)
form新属性:autocomplete、novalidate(不验证表单的输入输入)、email,number,range,search,date,week,month,color,url,submit,reset,autofocus,placeholder(内部提示)
input新属性:autocomplete、autofocus(自动获得焦点)、form、formaction、formenctype、formmethod、formnovalidate、formtarget、height and width、list、min and max、multiple、pattern (regexp)、placeholder(内部提示)、required、step、minlength、maxlength
刻度:min max low high value

新增储存方式

webStorage :sessionStorage,localStorage

新增协议

webSocket

其他

地理位置:HTML5 Geolocation API 用于获得用户的地理位置。
离线web应用:manifest
SSE: Server-Sent 事件指的是网页自动获取来自服务器的更新。
新增input输入类型:color,date,datetime,datetime-local,email,month,number,range,search,tel,time, url,week

被废除的元素

不再使用frame框架:frameset、frame、noframes
能使用css代替的元素:basefont、big、center、font、s、strike、tt、u
只有部分浏览器支持的元素:applet、bgsound、blink、marguee,还有acronym,dir

显示优先级

帧元素的优先级>表单元素>非表单元素
帧元素:frameset
表单元素:文本输入框 input type = text 密码输入框 type = password
单选框 type = radio 复选框 type = checkbox 文本输入域
列表框select
大部分剩下的都是非表单元素

块级元素:block

特点:总是从新行开始,高度,行高,内外边距都可以控制,宽度缺省是100%,除非设置新宽度,他可以容纳其他块级元素和内联元素。
aside, canvas,video,audio,source,figure,figurecaption,dialog,div,header,nav,section,arcticle,aside,footer,details,summary,h1~h6,p,ol,ul,li,dl,dt,dd,menu,menuitem,command,form,fieldset,legend,select,optgroup,option,datalist,table,caption,thead,tbody,tfoot,tr,th,td,col,colgroup,iframe,map,area,track,br,hr (水平分割线),pre,blockquote,address,center,spacer

行内元素:inline

特点:和其他元素在一行上,高度,行高不可以设置,只可以设置左右内外边距。宽度就是他的文字或图片的宽度,不可以改变。只能容纳文本和其他内联元素
mark, time, meter, progress, span,abbr(缩写),em,strong,mark,b,i,bdi (文本方向),bdo (文字方向),big, small, sup, sub,del,strike,s,ins,u,nobr (禁止换行),wbr(单词换行),tt,kbd(键盘文本),time, cite(引用), q(短引用),font,dfn
a,img,embed,label,input,button,keygen(生成密钥),textarea
output, ruby(中文注音),rt,rp,progress,meter,var,code,samp(计算机代码样本),select

行内块级元素 inline-block

可以设置宽度高度,不会自动换行
(input,button,textarea,select),img

空元素

在开始标签中关闭。
br,meta,hr,link,input,img

input 元素的类型

button, checkbox, file, hidden, email, image,password,radio,reset,submit,text,search,color,range,number

语义规范化

<p><dfn><abbr></abbr></dfn></p>
<ol><li><li></ol> <ul><li></li></ul>  ul里只能放li,li里可以放其他标签,li紧跟li,结束标签可以省略
<dl><dt><dd></dd></dt></dl>
<article><hgroup><h1></hgroup><div><p></p></div></article>

id不能为纯数字,变量不能是纯数字,只能是字母,下划线,$开头的。
使用button必须指明type属性值。

字符的Unicode 编码:s.charCodeAt();

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值