How to use html table tag

青灯夜游
Release: 2019-05-27 15:05:25
Original
4349 people have browsed it

html table tag is used to define HTML tables. A simple HTML table consists of the table element and one or more tr, th or td elements. The tr element defines table rows, the th element defines table headers, and the td element defines table cells.

How to use html table tag

#html How to use table tag?

table tag defines HTML table.

Description:

A simple HTML table consists of the table element and one or more tr, th or td elements. The tr element defines table rows, the th element defines table headers, and the td element defines table cells. More complex HTML tables may also include caption, col, colgroup, thead, tfoot, and tbody elements.

Note:

All major browsers support the

tag. In HTML 4.01, the "align" and "bgcolor" attributes of the table element are deprecated. In the XHTML 1.0 Strict DTD, the "align" and "bgcolor" attributes of the table element are not supported.

html table tag Example:

<!DOCTYPE html>
<html>
<body>
<table border="1">
  <tr>
    <th>name</th>
    <th>job</th>
  </tr>
  <tr>
    <td>灭绝师太</td>
    <td>PHP中文网高级讲师</td>
  </tr>
    <tr>
    <td>欧阳克</td>
    <td>PHP中文网讲师</td>
  </tr>
    <tr>
    <td>韦小宝</td>
    <td>PHP中文网初级讲师</td>
  </tr>
</table>
</body>
</html>
Copy after login

Rendering:

How to use html table tag

The above is the detailed content of How to use html table tag. 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
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!