Guest User

Untitled

a guest
Jan 16th, 2019
126
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.96 KB | None | 0 0
  1. **一、表格的基本的过程**
  2.  
  3. **二、表格标题caption**
  4. 可以使用```<caption>```来设置标题
  5. 单元格表格的标题一般位于整个表格的第1行
  6. 一个```<table>```表格只能含有一个表格标题
  7. <font style="color: red">```<caption>表格的标题</caption>```</font>
  8. **三、表头th**
  9. 1.表格的表头是```<th>是<td>```单元格的一种变体,实质上扔是一种单元格。
  10. 2.它一般位于第一位于第一行和第一列,用来表明这一行或列的内容类别。
  11. 3.在一般情况下,浏览器会以粗体的样式显示```<th>```元素中的内容。
  12. <font style="color: red">
  13. ```
  14. <tr>
  15. <th>表头</th>
  16. </tr>
  17.  
  18. ```
  19. </font>
  20.  
  21. **四、表格的基本属性**
  22. <font style="color: red">
  23. ```
  24. <table width=”表格的宽度”>
  25. <table height=”表格的高度”>
  26. <table align=”表格的对齐方式”>
  27.  
  28. ```
  29.  
  30. </font>
  31. <font style="color: blue">align::</font>
  32. left:整个表格在浏览器页面中左对齐
  33. center:居中对齐
  34. right:居右对齐
  35.  
  36. <font style="color: red">如果不指定表格宽度,浏览器就会跟据内容的多少自动调整宽度</font>
  37.  
  38. **五、表格的边框属性**
  39. 1.<font style="color: red">
  40. ```
  41. <table border=边框宽度” bordercolor=”边框颜色” cellspacing=”内框
  42. 宽度值” cellpadding=”文字与边框距离值”>
  43. ```
  44. </font>
  45. 2.默认情况下如果不指定<font style="color: red">border</font>属性,则浏览器将不显示表格边框。
  46.  
  47. 使用<font style="color: red">bordercolor</font>设置边框颜色。
  48.  
  49. 表格的内框宽度属性<font style="color: red">cellspacing</font>用于设置表格内部每个单元格之间的间距。
  50.  
  51. 在默认情况下,单元格里的内容会紧贴着表格的边框,使用<font style="color: red">cellpadding</font>来设置单元格边框与单元格里的内容之间的距离。
  52.  
  53. **六、合并单元格**
  54. 1. <font style="color: red">colspan</font> 水平合并(跨列)
  55. 2.<font style="color: red">rowspan</font>垂直合并(跨行)
Add Comment
Please, Sign In to add comment