当前位置:网站首页>6. form label
6. form label
2022-06-11 03:56:00 【M_ qsqsqsq】
6. Tabular label
6.1 The main function of the form
The form is mainly == Used for display 、 Display data ,== Because it can make the data display very regular , It's very readable . Especially when displaying data in the background , It's important to be able to use forms skillfully . A clean and simple table can present complicated data in a very organized way .
summary : Tables are not used to lay out pages , It's for Display data Of .
6.2 The basic syntax of tables
<table>
<tr><th> The first 1 List header </th> <th> The first 2 List header </th>...</tr>
<tr><td> The first 1 Xing di 1 Column cells </td> <td> The first 1 Xing di 2 Column cells </td>...</tr>
<tr><td> The first 2 Xing di 1 Column cells </td> <td> The first 2 Xing di 2 Column cells </td>...</tr>
<tr><td> The first 3 Xing di 1 Column cells </td> <td> The first 3 Xing di 2 Column cells </td>...</tr>
...
</table>
<th></th>Is used for header cell labels , Bold Center , table head abbreviation ;<table></table>Is the label used to define the table ;<tr></tr>Labels are used to define rows in a table , Must be nested in<table></table>In the label ;<td></td>Used to define cells in a table , Must be nested in<tr></tr>In the label ;- Letter td Means tabular data (table data), Data is the contents of data cells ;
6.3 Properties of the table
The attributes of table labels are actually developed, and we don't often use them , Back through CSS To set up .
The purpose of learning table attributes here is 2 individual :
- Remember these English words , Back CSS Will use .
- Intuitively feel the appearance of the form
| Property name | Property value | describe |
|---|---|---|
| align | left center right | Specifies the alignment of the table with respect to the surrounding elements |
| border | 1 or "" | Specifies whether the table cell has a border , The default is ", Indicates that there is no border |
| cellpadding | Pixel values | Specifies the space between the edge of a unit and its content , Default 1 Pixels |
| cellspacing | Pixel values | Specify the space between cells , Default 2 Pixels |
| width | Pixel value or percentage | Specify the width of the table |
| height | Pixel value or percentage | Specify the height of the form |
notes :
- cellspacing Usually set to 0 , So there is no gap between the cells
- Usually only width or , Will be scaled equally
6.4 Table structure label
Use scenarios : Because the table may be very long, in order to better express the semantics of the table , The table can be divided into two parts: the table head and the table body :
In the table label , Use them separately :<thead></thead> The header area of the label table 、<tbody></tbody> The body area of the label table . This can better distinguish the table structure .
<table>
<thead>
<tr><th> The first 1 List header </th> <th> The first 2 List header </th>...</tr>
</thead>
<tbody>
<tr><td> The first 1 Xing di 1 Column cells </td> <td> The first 1 Xing di 2 Column cells </td>...</tr>
<tr><td> The first 2 Xing di 1 Column cells </td> <td> The first 2 Xing di 2 Column cells </td>...</tr>
<tr><td> The first 3 Xing di 1 Column cells </td> <td> The first 3 Xing di 2 Column cells </td>...</tr>
...
</tbody>
</table>
6.5 merge cell
How to merge cells
Cross bank merger :rowspan=“ Number of merged cells ”
Cross column merge :colspan=" Number of merged cells ’’
[ Failed to transfer the external chain picture , The origin station may have anti-theft chain mechanism , It is suggested to save the pictures and upload them directly (img-fVVcHgiA-1654879047782)(E:\Typora\image-20220610231122728.png)]
Target cell :( Write merge code )
enjambment : The uppermost cell is the target cell , Write merge code
Cross column : The leftmost cell is the target cell , Write merge code
To merge cells :
- First, determine whether to merge across rows or columns .
- Find the target cell , Write down the merge method = Number of cells merged . such as :
<td colspan="2"><td>. - Delete extra cells .
<table align="center" border="1" cellspacing="0" width="300">
<thead>
<tr>
<th colspan="3"> Student transcript </th> <!-- Merge by columns 3 Column -->
</tr>
</thead>
<tbody>
<tr>
<td> full name </td>
<td> Discipline </td>
<td> achievement </td>
</tr>
<tr>
<td rowspan="3"> Xiao Ming </td> <!-- Merge by line 3 That's ok -->
<td> Chinese language and literature </td>
<td>98</td>
</tr>
<tr>
<!-- Because it is merged, the first column directly skips -->
<td> mathematics </td>
<td>96</td>
</tr>
<tr>
<!-- Because it is merged, the first column directly skips -->
<td> English </td>
<td>100</td>
</tr>
</tbody>
</table>
边栏推荐
- OpenGL Chapter 7 basic lighting
- Docker swarm installing MySQL Cluster
- JLINK latest version download
- B - 刷墙 (C语言)
- Go failing - expected ‘package‘, found ‘EOF‘
- How to improve the efficiency of regression testing
- Run Skynet for the first time
- Discussion on the development trend of remote power management unit (Intelligent PDU)
- 手工测试转不了自动化测试,缺的是什么?
- Docker uses PXC to build a MySQL Cluster (mysql:5.7.24)
猜你喜欢

Docker uses PXC to build a MySQL Cluster (mysql:5.7.24)
![[pan micro E9 development] single sign on Kingdee eas](/img/c7/50af4513be38b5e963ffc62de4e16d.jpg)
[pan micro E9 development] single sign on Kingdee eas

Student online education and teaching course management system based on SSM framework

给孩子的国学经典

Thoughts on the number of threads and CPU caused by the CPU load high alarm

Unity's data persistence -- Jason

Quartz: an old and robust open source task scheduling framework, which is smooth enough to use

Writing shell scripts using vscode

How to improve the efficiency of regression testing

OpenGL第十一章 多光源
随机推荐
【网络篇】套接字编程
[signalr complete series] Net6 Zhongshi signalr communication
Pthread in the multithreaded Trilogy
代码复现CSRF攻击并解决它
合理使用线程池以及线程变量
[cnn]| translation invariance
Management system of College Students' associations based on SSM
After the college entrance examination, what can I do and how should I choose my major-- From the heart of a college student
RT thread test
【可解释】|深层网络的公理化属性(Axiomatic Attribution for Deep Networks)
OpenGL Chapter 7 basic lighting
强烈推荐这款神器,一行命令将网页转PDF!
Image scaling with aspect ratio preserving by opencv
软件工程笔记之期末复习(简答)
Record the problem of Galaxy Kirin V10 server version once: an error is reported when installing KVM
Application of NTP network time server (PTP clock synchronization) in it network
[elt.zip] openharmony paper Club - multi tier storage hierarchical data compression
Host computer development (how to develop host computer)
B - 刷墙 (C语言)
How to improve the efficiency of regression testing