Home > Web Front-end > Front-end Q&A > What tags do html tables have?

What tags do html tables have?

青灯夜游
Release: 2021-12-23 16:42:24
Original
18801 people have browsed it

htmlTable tags are: 1. "

"; 2. " "; 3. ""; 4. ""; 5. " "; 6. ""; 8. "" and so on.

What tags do html tables have?

The operating environment of this tutorial: Windows 7 system, HTML5 version, Dell G3 computer.

In HTML, we use the

"; 7. "
"; 9. "
tag to define tables. Tables in HTML are similar to tables in Excel, including rows, columns, cells, headers and other elements. However, HTML tables are far less powerful than Excel tables in terms of functionality. HTML tables do not support mathematical calculations such as sorting, summation, and variance. They are generally used to display data.

Each table has several rows (defined by

tags), and each row is divided into several cells (defined by
tags). The letters td refer to table data, the contents of data cells. Data cells can contain text, pictures, lists, paragraphs, forms, horizontal lines, tables, and more.

A simple HTML table consists of the table element and one or more tr, th, or td elements.

The tr element defines the table row, the th element defines the header, and the td element defines the table cell.

More complex HTML tables may also include caption, col, colgroup, thead, tfoot, and tbody elements.

htmlTable tag

Tag Description
Define the table title.
Define the attribute values ​​of one or more columns in the table.
Define the column group in the table for formatting.
Define table.
Define the body content in the table.
Define the cells in the table.
Define the table note content (footnote) in the table.
Define the header cell in the table.
Define the header content in the table.
Define the rows in the table.

Example:

<table border="1">
	<caption>人物信息</caption>
	<tr>
		<th>姓名</th>
		<th>年龄</th>
	</tr>
	<tr>
		<td>Peter</td>
		<td>20</td>
	</tr>
	<tr>
		<td>Lois</td>
		<td>20</td>
	</tr>
</table>
Copy after login

What tags do html tables have?

Related recommendations: "html video tutorial

The above is the detailed content of What tags do html tables have?. 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