Blogger Information
Blog 6
fans 0
comment 0
visits 5934
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
html的table的行和列合并使用
王硕的博客
Original
2745 people have browsed it

html的table的行和列合并使用

主要使用colspan和rowspan,colspan用于列合并,rowspan用于行合并

  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="UTF-8">
  5. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  6. <title>Document</title>
  7. </head>
  8. <body>
  9. <table border="1" width="600" cellspacing="0">
  10. <caption>长江第一小学</caption>
  11. <thead>
  12. <tr>
  13. <th colspan="2">x</th>
  14. <!-- <th>x</th> -->
  15. <th>星期一</th>
  16. <th>星期二</th>
  17. <th>星期三</th>
  18. <th>星期四</th>
  19. <th>星期五</th>
  20. </tr>
  21. </thead>
  22. <tbody>
  23. <tr>
  24. <td rowspan="4">上午</td>
  25. <td>1</td>
  26. <th>数学</th>
  27. <th>语文</th>
  28. <th>历史</th>
  29. <th>化学</th>
  30. <th>生物</th>
  31. </tr>
  32. <tr>
  33. <!-- <td>上午</td> -->
  34. <td>2</td>
  35. <th>数学</th>
  36. <th>语文</th>
  37. <th>历史</th>
  38. <th>化学</th>
  39. <th>生物</th>
  40. </tr>
  41. <tr>
  42. <!-- <td>上午</td> -->
  43. <td>3</td>
  44. <th>数学</th>
  45. <th>语文</th>
  46. <th>历史</th>
  47. <th>化学</th>
  48. <th>生物</th>
  49. </tr>
  50. <tr>
  51. <!-- <td>上午</td> -->
  52. <td>4</td>
  53. <th>数学</th>
  54. <th>语文</th>
  55. <th>历史</th>
  56. <th>化学</th>
  57. <th>生物</th>
  58. </tr>
  59. <tr>
  60. <td colspan="7" align="center">中午休息</td>
  61. </tr>
  62. <tr>
  63. <td rowspan="3">下午</td>
  64. <td>1</td>
  65. <th>数学</th>
  66. <th>语文</th>
  67. <th>历史</th>
  68. <th>化学</th>
  69. <th>生物</th>
  70. </tr>
  71. <tr>
  72. <!-- <td>上午</td> -->
  73. <td>2</td>
  74. <th>数学</th>
  75. <th>语文</th>
  76. <th>历史</th>
  77. <th>化学</th>
  78. <th>生物</th>
  79. </tr>
  80. <tr>
  81. <!-- <td>上午</td> -->
  82. <td>3</td>
  83. <th>数学</th>
  84. <th>语文</th>
  85. <th>历史</th>
  86. <th>化学</th>
  87. <th>生物</th>
  88. </tr>
  89. <tr>
  90. <td colspan="7" align="center">放学回家</td>
  91. </tr>
  92. </tbody>
  93. </table>
  94. </body>
  95. </html>
Correcting teacher:天蓬老师天蓬老师

Correction status:qualified

Teacher's comments:下次不要这样写了, 当天作业不能分成多个博客
Statement of this Website
The copyright of this blog article belongs to the blogger. Please specify the address when reprinting! If there is any infringement or violation of the law, please contact admin@php.cn Report processing!
All comments Speak rationally on civilized internet, please comply with News Comment Service Agreement
0 comments
Author's latest blog post