", which is used to define HTML tables; but the elements in the table need to be defined using one or more tr, th, td and other tags, the syntax is "
"."/> ", which is used to define HTML tables; but the elements in the table need to be defined using one or more tr, th, td and other tags, the syntax is "
".">

Home >Web Front-end >HTML Tutorial >What are the tags of html tables

What are the tags of html tables

青灯夜游
青灯夜游Original
2021-05-17 17:27:5523326browse

In

html, the tag of the table is "

", which is used to define HTML tables; but the elements in the table need to be defined using one or more tr, th, td and other tags, the syntax is "< ;table>
".

What are the tags of html tables

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

tag defines an HTML table.

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.

Example:

<table border="1">
	<tr>
		<th>商品</th>
		<th>价格</th>
	</tr>
	<tr>
		<td>T恤</td>
		<td>¥100</td>
	</tr>
	<tr>
		<td>牛仔褂</td>
		<td>¥250</td>
	</tr>
	<tr>
		<td>牛仔库</td>
		<td>¥150</td>
	</tr>
</table>

Rendering:

What are the tags of html tables

#

Optional attributes of label
AttributesValueDescriptionalignbgcolorborderpixelscellpaddingcellspacingframerulessummarytextwidth Recommended tutorial: "html video tutorial
    left
  • center
  • right

Deprecated. Please use styles instead.

Specifies the alignment of the table relative to surrounding elements.

    ##rgb(x,x,x)
  • #xxxxxx
  • colorname
Deprecated.

Please use styles instead. Specifies the background color of the table.

Specifies the width of the table border.
    pixels
  • %
Specifies the space between the edge of the cell and its content.
    pixels
  • %
Specifies the space between cells.
void
  • above
  • below
  • hsides
  • lhs
  • rhs
  • vsides
  • box
  • border
Specifies which part of the outer border is visible.
none
  • groups
  • rows
  • cols
  • all
Specifies which part of the inner border is visible.
Specifies the summary of the table.
##%
  • pixels
  • Specifies the width of the table.
"

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