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:
Create table row:
Create columns (cells):
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:
Attribute
1. 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> Copy after login 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: | The function is the same as | td>Exactly 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!
Related labels:
source:php.cn
Previous article:What are the attributes of the HTML IMG tag? Learn how to use the IMG tag
Next article:What are the inline elements and inline elements of html? Introduction to the characteristics of html inline elements and inline elements
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Articles by Author
Latest Issues
Table class cannot be recognized/read in html/css
I have a table that is supposed to have a "table-class" class, but the class isn...
From 2024-04-02 18:29:23
0
1
355
Related Topics
More>
Popular Recommendations
Popular Tutorials
More>
Latest Downloads
More>
|
---|