Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- **一、表格的基本的过程**
- **二、表格标题caption**
- 可以使用```<caption>```来设置标题
- 单元格表格的标题一般位于整个表格的第1行
- 一个```<table>```表格只能含有一个表格标题
- <font style="color: red">```<caption>表格的标题</caption>```</font>
- **三、表头th**
- 1.表格的表头是```<th>是<td>```单元格的一种变体,实质上扔是一种单元格。
- 2.它一般位于第一位于第一行和第一列,用来表明这一行或列的内容类别。
- 3.在一般情况下,浏览器会以粗体的样式显示```<th>```元素中的内容。
- <font style="color: red">
- ```
- <tr>
- <th>表头</th>
- </tr>
- ```
- </font>
- **四、表格的基本属性**
- <font style="color: red">
- ```
- <table width=”表格的宽度”>
- <table height=”表格的高度”>
- <table align=”表格的对齐方式”>
- ```
- </font>
- <font style="color: blue">align::</font>
- left:整个表格在浏览器页面中左对齐
- center:居中对齐
- right:居右对齐
- <font style="color: red">如果不指定表格宽度,浏览器就会跟据内容的多少自动调整宽度</font>
- **五、表格的边框属性**
- 1.<font style="color: red">
- ```
- <table border=边框宽度” bordercolor=”边框颜色” cellspacing=”内框
- 宽度值” cellpadding=”文字与边框距离值”>
- ```
- </font>
- 2.默认情况下如果不指定<font style="color: red">border</font>属性,则浏览器将不显示表格边框。
- 使用<font style="color: red">bordercolor</font>设置边框颜色。
- 表格的内框宽度属性<font style="color: red">cellspacing</font>用于设置表格内部每个单元格之间的间距。
- 在默认情况下,单元格里的内容会紧贴着表格的边框,使用<font style="color: red">cellpadding</font>来设置单元格边框与单元格里的内容之间的距离。
- **六、合并单元格**
- 1. <font style="color: red">colspan</font> 水平合并(跨列)
- 2.<font style="color: red">rowspan</font>垂直合并(跨行)
Add Comment
Please, Sign In to add comment