Blogger Information
Blog 3
fans 0
comment 0
visits 4638
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
HTML简单表格和表单
Original
979 people have browsed it
  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. <style>
  9. table {
  10. background-color: #dedede;
  11. }
  12. </style>
  13. <body>
  14. <!--cellspacing="0" 设置边框线重叠 -->
  15. <!-- cellpadding="5" 设置边距上下左右 -->
  16. <table border="1" cellspacing="0" cellpadding="5">
  17. <!-- 设置列颜色 -->
  18. <colgroup>
  19. <col />
  20. <col style="background-color: powderblue;" />
  21. <col />
  22. <col style="background-color: red;" />
  23. <col />
  24. <col />
  25. </colgroup>
  26. <caption>
  27. 课程表
  28. </caption>
  29. <thead>
  30. <th>时间</th>
  31. <th>星期一</th>
  32. <th>星期二</th>
  33. <th>星期三</th>
  34. <th>星期四</th>
  35. <th>星期五</th>
  36. </thead>
  37. <tbody>
  38. <tr>
  39. <td rowspan="4" style="background-color: orchid;">上午</td>
  40. <td>数学</td>
  41. <td>语文</td>
  42. <td>数学</td>
  43. <td>数学</td>
  44. <td>语文</td>
  45. </tr>
  46. <tr>
  47. <td>数学</td>
  48. <td>语文</td>
  49. <td>数学</td>
  50. <td>语文</td>
  51. <td>语文</td>
  52. </tr>
  53. <tr>
  54. <td>品德</td>
  55. <td>语文</td>
  56. <td>语文</td>
  57. <td>科学</td>
  58. <td>体育</td>
  59. </tr>
  60. <tr>
  61. <td>美术</td>
  62. <td>综合</td>
  63. <td>科学</td>
  64. <td>英语</td>
  65. <td>综合</td>
  66. </tr>
  67. <tr>
  68. <td rowspan="3" style="background-color: indianred;">下午</td>
  69. <td>音乐</td>
  70. <td>音乐</td>
  71. <td>品德</td>
  72. <td>体育</td>
  73. <td>美术</td>
  74. </tr>
  75. <tr>
  76. <td>科学</td>
  77. <td>英语</td>
  78. <td>体育</td>
  79. <td>综合</td>
  80. <td>英语</td>
  81. </tr>
  82. <tr>
  83. <td colspan="5" style="text-align: center;">阳光</td>
  84. </tr>
  85. </tbody>
  86. </table>
  87. </body>
  88. </html>

课程表效果图

  1. <!-- 表单-->
  2. <!DOCTYPE html>
  3. <html lang="en">
  4. <head>
  5. <meta charset="UTF-8" />
  6. <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  7. <title>Document</title>
  8. </head>
  9. <style>
  10. body {
  11. text-align: center;
  12. }
  13. .content {
  14. border: solid 1px royalblue;
  15. width: 400px;
  16. background-color: slategray;
  17. margin: 0 auto;
  18. }
  19. </style>
  20. <body>
  21. <div class="content">
  22. <h3>账户注册</h3>
  23. <form id="regist">
  24. <div>
  25. <label for="user">
  26. 用户名:
  27. </label>
  28. <input
  29. id="user"
  30. type="text"
  31. name="username"
  32. value=""
  33. placeholder="不少于10个字"
  34. required
  35. />
  36. </div>
  37. <div>
  38. <label for="pwd" style="letter-spacing: 4px;">
  39. 密码:
  40. </label>
  41. <input
  42. id="pwd"
  43. type="password"
  44. name="password"
  45. value=""
  46. placeholder="密码不少于10位"
  47. required
  48. />
  49. </div>
  50. <div>
  51. <label for="sex_n">性别:</label>
  52. <input type="radio" name="sex" id="sex_n" checked /><label for="sex_n"
  53. ></label
  54. >
  55. <input type="radio" name="sex" id="sex_v" /><label for="sex_v"
  56. ></label
  57. >
  58. </div>
  59. <div>
  60. <label for=" ">兴趣爱好:</label>
  61. <input type="checkbox" name="data[book]" id="book" /><label for="book"
  62. >看书</label
  63. >
  64. <input type="checkbox" name="data[movie]" id="movie" /><label
  65. for="movie"
  66. >看电影</label
  67. >
  68. <input type="checkbox" name="data[play]" id="play" /><label for="play"
  69. >运动</label
  70. >
  71. <input type="checkbox" name="data[game]" id="game" /><label for="game"
  72. >玩游戏</label
  73. >
  74. </div>
  75. <div>
  76. <label for="" style="letter-spacing: 7px;">生日:</label>
  77. <input type="date" name="sr" />
  78. </div>
  79. <div>
  80. <label for="">所属部门:</label>
  81. <!-- 数据绑定 预加载 -->
  82. <input type="text" list="boss" />
  83. <datalist id="boss">
  84. <option value="信息管理中心"></option>
  85. <option value="信息咨询"></option>
  86. <option value="研发设计组"></option>
  87. <option value="研发开发组"></option>
  88. <option value="国内销售"></option>
  89. <option value="国外销售"></option>
  90. </datalist>
  91. </div>
  92. </form>
  93. <!-- 不在form表单中单独的邮箱提交 绑定表单form的id值 -->
  94. <div>
  95. <label for="email" style="letter-spacing: 11px;">邮箱:</label>
  96. <input
  97. type="email"
  98. name="email"
  99. id="email"
  100. form="regist"
  101. required
  102. autofocus
  103. />
  104. </div>
  105. <!-- 绑定form的id值提交 -->
  106. <button formaction="index.php?Logo=regist" formmethod="GET" form="regist">
  107. 注册
  108. </button>
  109. <button formaction="index.php?Logo=login" formmethod="POST" form="regist">
  110. 登陆
  111. </button>
  112. </div>
  113. </body>
  114. </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