Home  >  Article  >  Web Front-end  >  How to use the html thead tag

How to use the html thead tag

silencement
silencementOriginal
2019-05-27 11:01:494849browse

How to use the html thead tag

tag definition and usage

1. In html, the tag is used to combine html tables The header content is usually used together with the

tag and the tag to define the header, body and footer of the table respectively.

2. The tag must be a child element of the

tag element, and is applied after the tag, and tags Before.

3. The

tag,

tag and tag do not affect the layout of the table by default. CSS is usually used to define the style of the table.

basic attributes of the tag (no longer supported by html5)

align right: the alignment of the content in the

element (values: left, center ,justify,char).

char: The character in the

element is used for text alignment (value: character).

charoff: The offset of the first alignment character of the content in the

element (value: number).

valign: The vertical alignment of the content in the

element (values: top, middle, bottom, baseline).

tag supports html global attributes and html event attributes

Format

<thead>
<tr>
<td>......</td>
</tr>
......
</thead>

Instance

<!doctype html>
<html>
<head>
<meta charset="UTF-8">
<title>html< tbody>标签笔记</title>
</head>
<body>
<table border="1">
<thead>
<tr>
<th>thead1</th>
<th>thead2</th>
<th>thead3</th>
</tr>
</thead>
<tfoot>
<tr>
<td>tfoot1</td>
<td>tfoot2</td>
<td>tfoot3</td>
</tr>
</tfoot>
<tbody>
<tr>
<td>tbody1</td>
<td>tbody2</td>
<td>tbody3</td>
</tr>
</tbody>
</table>
</body>
</html>

operation result:

How to use the html thead tag

tag,

The above is the detailed content of How to use the html thead tag. 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
Previous article:How to use html th tagNext article:How to use html th tag

Related articles

See more