Basic knowledge of HTML tables

The main function
of the table 1. The table is mainly used to display and display data, because it can make the data display very regular and very readable. Especially when displaying data in the background, it is very important to be able to use tables proficiently. A refreshing and concise table can display complex data in a very organized manner.
Summary: Tables are not used to layout pages, but to display data.
Insert picture description here
1.2 Basic syntax of tables
Insert picture description here

  1. Is the label used to define the table.
  2. Labels are used to define rows in the table and must be nested in
    Label.
  3. Used to define the cells in the table and must be nested in the label.
  4. The letter td refers to table data, that is, the content of data cells.

3. Table label
Generally, the header cell is located in the first row or the first column of the table, and the text content in the header cell is displayed in bold and centered. The label represents the header part of the HTML table (abbreviation of table head)
Insert picture description here 4. Table Header cell label
The header cell is also a cell. It is often used in the first row of the table to highlight the importance. The text in the header cell will be bolded and centered.
5.1.4 Table attribute
table label This part of the attribute we actually develop us It is not commonly used, and it is set by CSS later.
There are two purposes:
5. Remember these English words, CSS will use later.
6. Intuitively feel the appearance of the table . 6.
Case study
Insert picture description here
7. Table structure label
usage scenario: Because of the table It may be very long. In order to better express the semantics of the table, the table can be divided into two parts: the table header and the table body.
In the table tags, use: the header area of ​​the tag table and the main area of ​​the tag table. This way It can better distinguish the table
structure. Insert picture description here
8. Table Tab-Merge Cells.
Under special circumstances, multiple cells can be merged into one cell. Here, the students will merge cells in the simplest
way . 7. How to merge cells
8. Target cell
9. Steps of merging cells:
(1) Method of merging cells:  Merge
across rows : rowspan="the number of merged cells"  Merge across columns: colspan="the number of
merged cells Three steps to merge cells:

  1. First determine whether to merge across rows or columns.
  2. Find the target cell. Write the merge method = the number of merged cells. such as:.
  3. Delete extra cells.
    Insert picture description here
    9. Related attributes of the table
    Insert picture description here

Guess you like

Origin blog.csdn.net/m0_46374969/article/details/111321638