Web front-end---HTML language form (day002)

form

Tables in web pages can also be implemented by HTML language

The basic composition of the form label

table tag: table tag

tr tag: row in the table

th tag: the header of the table

td label: table cell

usage:

		<!--表格从这里开始-->
		<table>
			<!-- 第一行从这里开始 -->
			<tr>
				<!-- 第一行第一列 -->
				<th>
					单元格所填内容
				</th>
				<!-- 第一行第二列 -->
				<th>
					单元格所填内容
				</th>
			<!-- 第一行从这里结束 -->
			</tr>
			<!-- 第二行从这里开始 -->
			<tr>
				<!-- 第二行第一列 -->
				<td>
					单元格所填内容
				</td>
				<!-- 第二行第二列 -->
				<td>
					单元格所填内容
				</td>
				<!-- 第二行从这里结束 -->
			</tr>
		<!-- 表格从这里结束 -->
		</table>

<th>It is the header, usually an attribute, automatically centered. (Generally only in the first line) on the part of the label may be added to a blog described in, for example: <b>, <p>etc ... format<th><b>内容<b></th>

<td>For the cell, the content can be filled in general, it does not automatically centered, but part of the label may be added on a blog described in, for example: <b>, <p>etc ... format<td><b>内容<b></td>

Table attributes

1.border (border attribute): Add a border to your table. Format: <border="number">(number is the border thickness)

2. background (background pattern): Add a background to your table. format:<background="图片位置">

3. bgcolor (background color): Add a background color to your table. format:<bgcolor="颜色(英文)">

4.cellpadding (inner margin): adjust the spacing between your cell content and the border. format:<cellpadding="number">

5. Cellspacing (outer margin, need to be used in conjunction with border): The border created with border is two layers, adjust the spacing of the two layers of borders, if set to 0, the border becomes realized. format:<border=:"number" cellspacing="number">

6. Align attribute: including: left, center, right. They are left, center, and right respectively.

7.valign attributes: including: top, middle, bottom. They are top, middle, and bottom respectively.

Note: It is obvious when the table is larger.

8. colspan attribute (merging cells across columns): used in the first column of several columns to be merged, and the corresponding column cells of the occupied row need to be deleted. format<colspan="number(需要合并的列数,包括本列在内)">

9. Rowsuan attribute (merge cells across rows): used in the first column of several rows that need to be merged, and the corresponding row cells of the occupied columns need to be deleted. format<rowspan="number(需要合并的行数,包括本行在内)">

Author's contact information:
qq945677662
vxa2482466921
If there is an error, please help me to correct it. Let's communicate together.

Guess you like

Origin blog.csdn.net/qq_23998145/article/details/109190646