Home > Article > Web Front-end > How much do you know about HTML table attributes? Come and find out more?
How much do you know about HTML table attributes? Come and find out more? Table tags are widely used in HTML and are easy for beginners to start with. However, there are also some attributes that can greatly improve the functionality of tables. Applied properly, you'll find that it makes your pages clear and beautiful. Let's learn about the HTML table attribute.
What is a table & the role of a table
What is a table: It consists of some rectangular boxes called cells from left to right and top to bottom. The function of the
table arranged together in order: to display information in a certain structure.
How to use table
Define table:f5d188ed2c074f8b944552db028f98a1f16b1740fad44fb09bfe928bcc527e08
Create table row:a34de1251f0d9fe1e645927f19a896e85194ba175fd9c71e9a9f6e68244d73a8
Create columns (cells):b6c5a531a458a2e790c1fd6421739d1cb90dd5946f0946207856a8a37f441edf
Note: By default, the number of columns in each row is uniform.
Features of table:
1. Exclusive row
2. Adaptive width (determined by content)
table table attributes:
f5d188ed2c074f8b944552db028f98a1 Attributes
width: Set the table width
height: Set the height of the table
1.63bd76834ec05ac1f4c0ebbeaafb099437eb775bb5a9e6f3d094e96a76117fe8
Function: Define the title for the table
Position: Displayed in the center directly above the table
<table> <caption>标题</caption> <tr> <td></td> <td></td> </tr> </table>
2. Row title or column title
Column title: Each column in the first row, bold, horizontal centering effect display
Row title: The first column in each row, bold, Horizontally centered effect display
Row (column) title:b4d429308760b6c2d20d6300079ed38e01c3ce868d2b3d9bce8da5c1b7e41e5b
b4d429308760b6c2d20d6300079ed38e01c3ce868d2b3d9bce8da5c1b7e41e5bThe function is the same asb6c5a531a458a2e790c1fd6421739d1c90cc1e42bbf9b97c5947038eac7f874eExactly the same
table border merge:Attribute: border-collapse
Value:
1.separate default value , separate border mode
2.collapse border merge mode
table border margin:1.Function: Set the border between adjacent cells The distance between cells (similar to cellspacing)
2. Attribute: border-spacing
Value:
1. Take 1 value: indicating equal horizontal and vertical spacing
2. Take 2 values: the horizontal spacing represented by the first value
and the vertical spacing represented by the second value Separated by a space between the two values
3. Requirements
border-collapse must be separate
It must be valid in separated border mode
Hidden display effect:
Attribute: visibility:collap:se Used on table elements to delete a row or column without affecting the entire layout of the table
[Related recommendations]
Basic elements of html, allowing you to learn HTML from scratchWhat is an HTML file? A preliminary understanding of HTML files
The above is the detailed content of How much do you know about HTML table attributes? Come and find out more?. For more information, please follow other related articles on the PHP Chinese website!