当前位置:网站首页>Style of table form
Style of table form
2022-07-22 06:22:00 【Dummerd】
Catalog
Forms are used a lot in daily life , such as excel Is a tool specially used to create tables ,
Tables are used to represent some formatted data , such as : The curriculum 、 Bank statement
You can also create different tables in web pages .
1、 stay HTML in , Use table Tag to create a table
2、 stay table Use in Tags tr To represent a row in a table , There's a couple of lines tr
3、 stay tr Required in td To create a cell , There are just a few cells td
4、table The tag has its own attributes : border="1" width="40%" align="center"
5、rowspan Used to set vertical merge cells
6、colspan Merge cells horizontally
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title> form </title>
</head>
<body>
<table border="1" width='50%' align="center">
<tr>
<td> full name </td>
<td> weight </td>
<td> height </td>
<td rowspan="4"> The horses are always close </td>
</tr>
<tr>
<td> Zhang San </td>
<td>100kg</td>
<td>180cm</td>
</tr>
<tr>
<td> Li Si </td>
<td>50kg</td>
<td>190cm</td>
</tr>
<tr>
<td colspan="3"> Put it as Ken .</td>
</tr>
</table>
</body>
</html>
The table style
In some cases the form is very long
In this case, you need to divide the table into three parts , Header , The body of the form , At the bottom of the table
stay HTML There are three tags for us
thead Header Always at the head of the form
tbody The body of the form Always in the middle of the form
tfoot The bottom of the table Always at the bottom of the table
Used to distinguish different parts of the table , The order , The browser will automatically adjust
If the form doesn't say tbody, The browser will automatically add tbody
And put all tr in tbody in , So pay attention to tr Not at all table Child elements , It is tbody Child elements
adopt table > tr Cannot select line Need to pass through tbody > tr
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<title></title>
</head>
<body>
<table>
<thead>
<tr>
<th> date </th>
<th> income </th>
<th> spending </th>
<th> total </th>
</tr>
</thead>
<tbody>
<tr>
<td>10.24</td>
<td>500</td>
<td>300</td>
<td>200</td>
</tr>
<tr>
<td>10.24</td>
<td>500</td>
<td>300</td>
<td>200</td>
</tr>
<tr>
<td>10.24</td>
<td>500</td>
<td>300</td>
<td>200</td>
</tr>
<tr>
<td>10.24</td>
<td>500</td>
<td>300</td>
<td>200</td>
</tr>
<tr>
<td>10.24</td>
<td>500</td>
<td>300</td>
<td>200</td>
</tr>
<tr>
<td>10.24</td>
<td>500</td>
<td>300</td>
<td>200</td>
</tr>
</tbody>
<tfoot>
<tr>
<td></td>
<td></td>
<td> total </td>
<td>100</td>
</tr>
</tfoot>
</table>
</body>
</html>
Out of the long table style
边栏推荐
猜你喜欢
IDEA 搭建和环境变量
The role of visual management of communication infrastructure in ISO 2.0
Development of digital collection system -- Construction of mall blind box H5 platform
leetcode 1380. Lucky number in matrix
Episode 2 best B tutorial of VMware virtual machine installation (13 days)
壳聚糖/葡聚糖/纳米羟基磷灰石复合水凝胶/鱼明胶-半乳糖壳聚糖水凝胶肝支架的制备
Automatic generation of computer room visual management labels
室外资源光纤管理
Typora Beta版过期解决
Haproxy2.6 load installation configuration
随机推荐
leetcode 931. Minimum sum of descent path
[MATLAB]:基础知识学习
leetcode 1732.找到最高海拔
Leetode 416.分割等和子集
Control of semiconductor refrigeration and heating based on general single chip microcomputer control of cold and hot head in mobile phone radiator massage instrument
2D转换之旋转rotate,2D转换中心点transform-origin及2D转换之缩放scale
Idea shortcut key (day 16)
Sword finger offer II 100 Sum of minimum paths in triangle
IP protocol, the king of defending
LeetCode刷题:链表中倒数第k个节点
Xshell remote connection server
How to realize visualization of basic equipment efficiently
The role of visual management of communication infrastructure in ISO 2.0
leetcode 724. Find the central subscript of the array
Idea connects to MySQL database
网络连接工具大全
Bypass some dog SQL and XSS
LeetCode刷题:用栈实现队列 与 字符串解码
Discussion on DLL killing free technology
第1集 vmware虛擬機安裝最牛B教程(12天)