• 表格:

thead 表头
tbody 表体
tfoot 表尾
th 列标题,默认居中加粗的td
caption 表格表体,默认左右居中
colgroup span=”num” 列分组

  • 表格属性:

border-spacing:单元格间距,必须给table添加
border-collapse:collapse; 合并边框线,必须给table添加
border-collapse:separate; 默认值,不合并
empty-cells:show;无内容单元格,展示
empty-cells:hide;无内容单元格,隐藏
table-layout:fixed;单元格宽度固定(宽度不固定)
table-layout:auto;默认值,自适应,宽度不固定

  • 表单:

action:”提交地址”;
method:”提交方式”; post/get
name:”表单名称”;

input

 type=”radio” 单选按钮
【注】同一组的name属性值必须一致才能达到互斥的效果
 checked=”checked”默认选中

type=”checkbox” 多选按钮
【注】name值不需要一致
disabled=”disabled” 禁止选中
checked=”checked” 默认选中

label绑定选中标签
【例】
<input type=”radio” value=”xx” name=”sex” id=”bj”>
<label for=”bj”>哈哈</label>

select>option 下拉列表>下拉列表项
selected=”selected”默认选中下拉

textarea多行文本输入框
cols=”” 改变元素宽
rows=”” 改变元素高
【注】不是px为单位,指的是容纳字符数,但是有偏差,可以通过样式修改大小
【注】默认可以拖拽大小;
resize:”none”; 禁止拖拽

fieldset>legend 表单字段集>表单字段集标题
【注】一个filedest里只有一个直接的legend,可以有多个fieldest
fieldest嵌套写法
<fieldset id=””>
<legend></legend>
<fieldset id=””>
<legend></legend>
</fieldset>
</fieldset>