Home  >  Article  >  Web Front-end  >  How to use table tag elements such as Table, tr, td, and th

How to use table tag elements such as Table, tr, td, and th

php中世界最好的语言
php中世界最好的语言Original
2017-11-23 15:11:174876browse

If we make a website, Table tag elements are an indispensable part, then let’s analyze how to use Table, tr, td, th table tag elements, and how to use themNotesWhat's there.

table table syntax and structure

<table> 
    <tr> 
        <td> </td> 
        <td> </td> 
        <td> </td> 
    </tr> 
</table> 
或者
<table> 
    <tr> 
        <th> </th> 
        <th> </th> 
        <th> </th> 
    </tr> 
</table>

In the above two table structures, td and th are used, and they can be used without any difference.

Instructions for using the table tag

For example, a spreadsheet-type data table.

Table table label usage scenario

table table practical application place

Table tr td th table use case

<table width="300" border="1" cellspacing="0"> 
    <tr> 
        <th>班级</th> 
        <th>日期</th> 
        <th>标题</th> 
    </tr> 
    <tr> 
        <td>一班</td> 
        <td>2012-5-10</td> 
        <td>标题1</td> 
    </tr> 
    <tr> 
        <td>二班</td> 
        <td>2012-5-20</td> 
        <td>标题2</td> 
    </tr> 
</table>

Introduced so many I believe Everyone also has a certain knowledge and understanding of the label elements of the table. For more exciting information, please pay attention to the php Chinese website Other related articles!

Related reading:

How to know whether the browser supports html5

##How to use the 1aa9e5d373740b65a0cc8f0a02150c53 tag of html

How to use the c37f8231a37e88427e62669260f0074d tag element in HTML5

The above is the detailed content of How to use table tag elements such as Table, tr, td, and th. 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