When designing web pages, tables are often used to organize page information. It can divide the web page into any number of rectangular areas. Each area can contain navigation, text, images, animations and other information. The designer can Place any web element into it.
1. Definition of table:
1) Insert pairs of
tags where tables need to be used, This will complete the insertion of the table. Commonly used tags for defining tables are
<🎜> <🎜>Example: <🎜> <🎜> <🎜>Effect: <🎜> <🎜> <🎜> <🎜>2) Divide the structure table <🎜> <🎜> Dividing the structure table means dividing a table into three parts, using three tags respectively <🎜> <🎜>
<🎜> Tags >
<🎜><🎜>
<🎜>Define a set of header rows<🎜>
<🎜>
<🎜> td>
<🎜>Add a label to the table<🎜>
<🎜>
<🎜> < td> <🎜>Define the main part of the table<🎜>
2. Table attributes
In the design of web pages, it is often necessary to make some formatting settings for the table
in the web page. These settings are completed by setting the table tag attributes. of.
属性名称
说明
width
表格的宽度
border
边框粗细
frame(8种属性值)
设置表格的边框样式
属性值
说明
void
不显示边框
border
显示上下左右边框
above
显示上边框
below
显示下边框
hsides
显示上下边框
lhs
显示左边框
rhs
显示右边框
vsides
显示左右边框
Attribute name
Description
width
属性值
说明
all
显示所有内部边框
none
不显示内部边框
groups
显示介于行列边框
cols
仅显示列边框
rows
仅显示行边框
Width of the table
<🎜> <🎜> <🎜> <🎜>border<🎜> <🎜> <🎜> <🎜>Border thickness <🎜> <🎜> <🎜> <🎜> <🎜> <🎜>frame (8 attribute values) <🎜> <🎜> <🎜> <🎜>Set the border style of the table<🎜>
<🎜 > <🎜> <🎜>Attribute value 🎜> <🎜> <🎜> <🎜>void<🎜> <🎜> <🎜> <🎜>Do not show borders<🎜> <🎜> <🎜> <🎜> <🎜> <🎜>border<🎜> <🎜> <🎜> <🎜>Show top, bottom, left and right borders<🎜> <🎜> <🎜> <🎜> <🎜> <🎜>above<🎜> <🎜> <🎜> <🎜>Show top border<🎜> <🎜> <🎜> <🎜> <🎜> <🎜>below<🎜> <🎜> <🎜> <🎜>Show bottom border<🎜> <🎜> <🎜> <🎜> <🎜> <🎜>hsides<🎜> <🎜> <🎜> <🎜>Show top and bottom borders<🎜> <🎜> < 🎜> <🎜> <🎜> <🎜>lhs<🎜> <🎜> <🎜> <🎜>Show left border<🎜> <🎜> <🎜> <🎜> <🎜> <🎜>rhs<🎜> < 🎜> <🎜> <🎜>Show right border<🎜> <🎜> <🎜> <🎜> <🎜> <🎜>vsides<🎜> <🎜> <🎜> <🎜>Show left and right border<🎜> <🎜 > <🎜> <🎜> <🎜><🎜> <🎜> <🎜> <🎜> <🎜> <🎜>rules (5 attribute values) <🎜> <🎜> <🎜>Set the inside of the table Border attributes<🎜>
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