"; 2. ""; 3. ""; 4. ""; 5. ""; 6. ""; 8. "" and so on."/>"; 2. ""; 3. ""; 4. "
"; 7. "
"; 9. "
"; 5. ""; 6. ""; 8. "" and so on.">

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

What tags do html tables have?

青灯夜游
青灯夜游Original
2021-12-23 16:42:2418764browse

htmlTable tags are: 1. "

"; 3. ""; 4. "
"; 7. "
"; 9. "
"; 2. "
"; 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>

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!

html5 html table tbody td tr th excel
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:What is an empty element in htmlNext article:What is an empty element in html

Related articles

See more