Home > Web Front-end > HTML Tutorial > 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中世界最好的语言
Release: 2017-11-23 15:11:17
Original
4940 people have browsed it

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>
Copy after login

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>
Copy after login

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

tag of html

How to use the

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!

Related labels:
source:php.cn
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template