表格
table
thead
tbody
tfoot
table>tr>td(th加粗居中显示)
css属性
border-sapcing:数值px;
表格边框设置为细线 borde-collapse:collapse;( 单元格随内容变大变小)/合并单元格边框
设置表格固定宽度,不随内容变大变小
table-layout:fixed;
html属性
borderwidthheightcellspacingalign
表格里的第一列文字整体靠右
table tr td:first-child{text-align:right}
colgroup
<colgroup><col span="2" style="background-color:red;"></colgroup>
表单
form,一般把表单元素都放到表单集里面action: 表单提交路径method: 提交方式 GET/POST文本输入框 text
<input type="text" name="username" id="" value="123" />
密码框 password
<input type="password" name="uesepass" id="" value="1233" />
提交按钮submit
<input type="submit" name="" id="" value="免费注册" />
单选框 checkbox起相同的name值,可以互斥
<input type="radio" name="sex" id="" value="" />男<input type="radio" name="sex" id="" value="" />女
下拉列表 select
内联块 selected:默认选中
<select name="hh" style="width: 200px;"><option value="1">160</option><option value="2">165</option><option value="5" selected="selected">180</option><selected>
多选框 checked
默认选中 selected禁止选中 disable
<input type="checkbox" name="" id="" value="" />lol<input type="checkbox" name="" id="" value="" checked="checked" />王者荣耀<input type="checkbox" name="" id="" value="" disabled />Gta5
多行文本域 Textarea
内联块 resize: none; 禁止用户调整大小
<textarea rows="" cols="" style="width: 200px;height: 100px;resize: none;vertical-align: middle;"></textarea>
置换元素:标签写完之后,在页面中会形成区域 img/input/textarealect(类似于内联块)
非置换元素:除了置换元素
重置按钮 reset
<input type="reset" name="" id="" value="按钮文本" />
文件上传按钮 submit
<input type="submit" name="" id="" value="按钮文本" />
普通按钮 button
<input type="button" name="" id="" value="我是没用的按钮" />
内联块得对其方式
直接加在内联块元素身上,才有作用(如果内联块元素和文字对不齐的时候,可以加上调整位置)vertical-align:
baseline 基线
middle 中线
top 顶线
bottom 底线