块元素属性
- div:无意义的块元素
- h1~h3 :标题,有font-size、font-weigth、margin等属性
- p:段落,有margin属性
- html
- body :身体,有margin属性
- ui、li :无序列表、列表项。其中ul有margin、padding、list-style等属性
- oi、li :有序列表、列表项。其中ol有margin、padding、list-style等属性
- dl、dt、dd :有序列表。其中dl、dd有margin属性
- H5新增元素:语义化标签,如下表格
元素 | 语义 |
---|---|
header | 头 |
nav | 导航 |
article | 主体 |
section | 部分 |
footer | 脚 |
aside | 网页附属部分 |
行内元素属性
- span :无意义的行内元素
- a :超链接,有属性href(url、相对路径、绝对路径、mailto、锚点)
- img:图片,有src(url、相对路径、绝对路径)和alt属性
- strong:强调类型加粗
- bold/b:加粗
- em:强调类型斜体
- i:斜体
- sub:下标
- sup:上标
- del:删除线
功能元素属性
- table:表格,有border、width等属性,基本格式如下
<table>
<!-- 表格标题 -->
<caption></caption>
<thead></thead>
<tbody></tbody>
<tr>
<!-- th/td中可以放任何子元素-->
<td></td>
</tr>
<tfoot></tfoot>
</table>
- form:表单,有input、select、textarea等标签,基本格式如下
<form action="">
input
select
textarea
</form>
其中form的属性:
- action :后台接口地址
- method:请求方式(get post两种 )
- enctype :编码方式
input属性:
- name:不能省略,作为参数中的key
- value:作为参数中的value,在按钮中务必指定value值
- checked:单值属性,默认选址
- placeholder:提示语
select属性:
- option:标签中的文本显示在网页中,提交的值应该是option的value值,当这个值没有设定的
textarea属性:
- placeholder:提示语