Home  >  Article  >  Web Front-end  >  Introduction to the table tag

in HTML (with code)

Introduction to the table tag

in HTML (with code)
不言
不言Original
2018-08-02 09:53:123234browse

This article introduces to you the introduction of the table tag f5d188ed2c074f8b944552db028f98a1 in HTML (with code). It has certain reference value. Friends in need can refer to it. I hope it will be helpful to you.

Table

Tables are defined by the f5d188ed2c074f8b944552db028f98a1 tag.

Each table has several rows (defined by a34de1251f0d9fe1e645927f19a896e8 tags), and each row is divided into several cells (defined by b6c5a531a458a2e790c1fd6421739d1c tags).

The letters td refer to table data, that is, the contents of data cells.

Data cells can contain text, pictures, lists, paragraphs, forms, horizontal lines, tables, etc.

For example, draw the following table:

Analysis: 1. Analyze rows, each row is a tr tag

 2. Starting from the first row, see how many cells there are in each row. The cells are the td tags

 3. If the space occupied is 1 row and 1 column, omit the number of rows and directly read 0f2d6b6549b1008808c133931ec1a1c9b90dd5946f0946207856a8a37f441edf.

The code of the above picture is as follows

<body>
        <table width="400" height="400" border="2">
            <!-- 第1行 -->
            <tr>
                <td colspan="4" bgcolor="aqua"></td>
            </tr>
            <!-- 第2行 -->
            <tr>
                <td rowspan="4" bgcolor="antiquewhite"></td>
                <td colspan="3" bgcolor="antiquewhite"></td>
            </tr>
            <!-- 第3行 -->
            <tr>
                <td rowspan="3" bgcolor="aquamarine"></td>
                <td colspan="2" bgcolor="aquamarine"></td>
            </tr>
            <!-- 第4行 -->
            <tr>
                <td rowspan="2" bgcolor="bisque"></td>
                <td bgcolor="bisque"></td>
            </tr>
            <!-- 第5行 -->
            <tr>
                <td></td>
            </tr>
        </table>
    </body>

Recommended related articles:

htmlGiven the label option and add the label (with code)

What is elastic layout? Basic application of flexible layout flex (with code)

The above is the detailed content of Introduction to the table tag

in HTML (with code). For more information, please follow other related articles on the PHP Chinese website!

Statement:
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