h5-经常使用标签html
h5:语义化标签前端
语义化标签的好处:html5
1) html语义化让页面的内容结构化,结构更清晰,便于对浏览器、搜索引擎解析;
2) 即便在没有样式CSS状况下也以一种文档格式显示,而且是容易阅读的;
3) 搜索引擎的爬虫也依赖于HTML标记来肯定上下文和各个关键字的权重,利于SEO;
4) 使阅读源代码的人对网站更容易将网站分块,便于阅读维护理解。浏览器
定义一个导航
nav 导航标签
header 头部
footer 底部
hgroup 标题组
section 划分区域的
article 主题内容
aside 主题内容的附属信息
figure 定义媒体信息
figcaption figure媒体的标题
time 定义日期(datetime time标签上面的属性)ide
<time datetime="2019-02-14">情人节</time>有约会吗
html5中的post
datalist下拉列表网站
<datalist id="vlist"> <option value="百度">百度</option> <option value="千度">千度</option> <option value="京东">京东</option> <option value="淘宝">淘宝</option> </datalist>
<details open> <!--属性和属性值一致的时候,能够只写一个open="open" open--> <summary>人人教育</summary> <p>前端培训很专业</p> </details>
dialog对话ui
<dialog open> <dt>老师在吗?</dt> <dd>1+1=?</dd> <dt>学生</dt> <dd>这个问题不会吗?你问的问题我无法接啊?</dd> </dialog>
address 地址信息,起提示做用搜索引擎
mark 标记,背景颜色默认是黄色,警告黄url
progress 进度条
pre 能够按照指定的结构输出
sub 设置下标 例如H2O
sup 设置上标 例如2的2次方
h5表单
action 提交地址
method 数据提交方式 get ,post
autofocus 自动获取焦点
required 验证信息
html5中表单新增的
<input type="color" /> <!--取色器--> <input type="tel" /> <!--在手机端会调取数字键盘--> <input type="number" /> <!--能够增减数字的文本框--> <input type="email" /> <!--在手机端会调取键盘@--> <input type="date" /> <!--带年月日的输入框--> <input type="week" /> <!--周--> <input type="month" /> <!--月--> <input type="url" /> <!--在手机端会调取带网址的输入框--> <input type="search" /> <!--搜索框--> <input type="datetime" /> <!--时间标签,这个框输入的是时间--> <input type="range" value="0" /> <!--控制调节按钮-->