html th is a tag used to define the header cell in the table. The text inside the th element is usually rendered as centered bold text, while the text inside the td element is usually left-aligned. Normal text.
The operating environment of this article: windows7 system, HTML5 version, DELL G3 computer
html What is the use of th?
HTML Define the header cell in the table. There are two types of cells in HTML forms: Header cell - contains header information (created by the th element) Standard cells - containing data (created by td elements) Text inside a td element will usually be rendered as centered bold text, while The text is usually left-aligned normal text. Tip: If you need to span content across multiple rows or columns, use the colspan and rowspan attributes. Example Ordinary HTML table, containing two rows and two columns: Effect: Recommended learning : "HTML video tutorial" tag
<html>
<body>
<table border="1">
<tr>
<th>Company</th>
<th>Address</th>
</tr>
<tr>
<td>Apple, Inc.</td>
<td>1 Infinite Loop Cupertino, CA 95014</td>
</tr>
</table>
</body>
</html>
The above is the detailed content of What is the use of html th. For more information, please follow other related articles on the PHP Chinese website!