当前位置:网站首页>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>
边栏推荐
- [elt.zip] openharmony paper Club - Data high-throughput lossless compression scheme
- [interpretable] | axiomatic attribute for deep networks
- 编程大作战 -- 挑战高考题
- Benefits of declaring variables
- Quel genre de personne est heureuse?
- Course classification tree structure display
- Image scaling with aspect ratio preserving by opencv
- js最常用的排序---手撕js系列
- 6. 表格标签
- PostgreSQL statement
猜你喜欢
![[elt.zip] openharmony paper Club - electronic device software update compression](/img/d8/0a6beafc9b986f6fc61411ba09c4a2.png)
[elt.zip] openharmony paper Club - electronic device software update compression

基于SSM框架的学生在线教育教学课程管理系统

/The world of 10 recommended websites for learning programming has entered the era of the Internet. According to a recently released Internet trends 2016 report, China has become a leader in the Inter

Guide de migration Maui

Kirin V10 installation of tongweb7.0

基于SSM的考试项目管理系统

Nsthread of the multithreaded Trilogy

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

Samsung Galaxy S21 ultra and Apple iPhone 13 Pro Max: which one should you choose
![[elt.zip] openharmony paper Club - fast random access string compression](/img/e6/e47046d6e56ca0c2608fc50060eb23.png)
[elt.zip] openharmony paper Club - fast random access string compression
随机推荐
Quel genre de personne est heureuse?
Linq. pdf
Market prospect analysis and Research Report of engraving laser in 2022
Lua removing elements from a loop in a list
Manual testing cannot be changed to automated testing. What is missing?
Implementation of publish and subscribe mode ----- hand tearing JS series
大厂外包or自研公司?测试人找工作怎么选?
[CNN]|CNN与Transformer区别
RT thread test
SSL library selection
Detailed explanation of scenario method for common test case design methods
软件工程笔记之期末复习(简答)
Samsung Galaxy S21 ultra and Apple iPhone 13 Pro Max: which one should you choose
OpenGL error Guide
Optimize your code execution efficiency with completabilefuture
MAUI 迁移指南
Parameter transfer format when the parameter of PostgreSQL function is a user-defined type
Quartz:老而弥坚的开源任务调度框架,用起来够丝滑
Web upload file Preview
Management system of College Students' associations based on SSM