Home > Web Front-end > HTML Tutorial > How to use html th tag

How to use html th tag

silencement
Release: 2019-05-27 10:56:18
Original
4948 people have browsed it

How to use html th tag

标签定义及使用说明

标签定义 HTML 表格中的表头单元格。

HTML 表格有两种单元格类型:

表头单元格 - 包含头部信息(由 元素创建)

标准单元格 - 包含数据(由 元素创建)

元素中的文本通常呈现为粗体并且居中。

元素中的文本通常是普通的左对齐文本。

提示和注释

提示:如果需要将内容横跨多个行或列,请使用 colspan 和 rowspan 属性!

示例

一个简单的 HTML 表格,带有两个表头单元格和两个数据单元格:

<table border="1">
<tr>
<th>Month</th>
<th>Savings</th>
</tr>
<tr>
<td>January</td>
<td>$100</td>
</tr>
</table>
Copy after login

The above is the detailed content of How to use html th 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