博客列表 >4月3日 html常用元素

4月3日 html常用元素

Yang_Sir
Yang_Sir原创
2020年04月04日 12:41:44567浏览

4月3日课程 HTML常用元素

  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>HTML常用元素演示</title>
  7. </head>
  8. <body>
  9. <!-- 页眉 -->
  10. <header>
  11. <nav>
  12. <ul>
  13. <li><a href="">导航1</a></li>
  14. <li><a href="">导航2</a></li>
  15. <li><a href="">导航3</a></li>
  16. </ul>
  17. </nav>
  18. </header>
  19. <!-- 主体 -->
  20. <div class="container">
  21. <aside>
  22. <div>
  23. <ol>
  24. <li><a href="">排名01</a></li>
  25. <li><a href="">排名02</a></li>
  26. <li><a href="">排名03</a></li>
  27. <li><a href="">排名04</a></li>
  28. <li><a href="">排名05</a></li>
  29. <li><a href="">排名06</a></li>
  30. <li><a href="">排名07</a></li>
  31. <li><a href="">排名08</a></li>
  32. <li><a href="">排名09</a></li>
  33. <li><a href="">排名10</a></li>
  34. </ol>
  35. </div>
  36. </aside>
  37. <main>
  38. <div class="table">
  39. <table border="1" cellspacing="0" align="center" width="500">
  40. <caption style="margin-bottom: 10px;font-size:1.5rem;">
  41. HTML表格元素
  42. </caption>
  43. <colgroup>
  44. <col bgcolor="lightblue"></col>
  45. <col></col>
  46. <col></col>
  47. <col></col>
  48. <col></col>
  49. </colgroup>
  50. <thead bgcolor="lightgreen">
  51. <th>序号</th>
  52. <th>名称</th>
  53. <th>内容</th>
  54. <th>描述</th>
  55. <th>备注</th>
  56. </thead>
  57. <tbody>
  58. <tr>
  59. <td rowspan="2">内容01</td>
  60. <td>内容02</td>
  61. <td>内容03</td>
  62. <td>内容04</td>
  63. <td>内容05</td>
  64. </tr>
  65. <tr>
  66. <td>内容02</td>
  67. <td>内容03</td>
  68. <td>内容04</td>
  69. <td>内容05</td>
  70. </tr>
  71. </tbody>
  72. <tbody bgcolor="gray">
  73. <tr>
  74. <td>内容01</td>
  75. <td>内容02</td>
  76. <td>内容03</td>
  77. <td>内容04</td>
  78. <td>内容05</td>
  79. </tr>
  80. <tr>
  81. <td>内容01</td>
  82. <td>内容02</td>
  83. <td>内容03</td>
  84. <td>内容04</td>
  85. <td>内容05</td>
  86. </tr>
  87. <tr>
  88. <td>内容01</td>
  89. <td>内容02</td>
  90. <td>内容03</td>
  91. <td>内容04</td>
  92. <td>内容05</td>
  93. </tr>
  94. </tbody>
  95. <tfoot>
  96. <tr>
  97. <td>表格底部:</td>
  98. <td colspan="4">表格底部</td>
  99. </tr>
  100. </tfoot>
  101. </table>
  102. </div>
  103. <hr>
  104. <!-- 表单-->
  105. <div class="form">
  106. <h3>用户注册</h3>
  107. <form action="">
  108. <section>
  109. <label for="username">用户名:</label><input type="text" id="username" name="username" placeholder="6至10位数字字母组合" required><br>
  110. </section>
  111. <section>
  112. <label for="password">密&nbsp;&nbsp;&nbsp;&nbsp;码:</label><input type="password" id="password" name="password" placeholder="8至18位数字字母组合" required>
  113. </section>
  114. <section>
  115. <label for="secret">性&nbsp;&nbsp;&nbsp;&nbsp;别:</label>
  116. <input type="radio" name="gender" id="male" value="1"><label for="male"></label>
  117. <input type="radio" name="gender" id="female" value="0"><label for="female"></label>
  118. <input type="radio" name="gender" id="secret" value="3" checked><label for="secret">保密</label>
  119. </section>
  120. <section>
  121. <div class="box">
  122. <label for="programme">兴&nbsp;&nbsp;&nbsp;&nbsp;趣:</label>
  123. <input type="checkbox" name="hobby[]" id="game"><label for="game">游戏</label>
  124. <input type="checkbox" name="hobby[]" id="sleep"><label for="sleep">睡觉</label>
  125. <input type="checkbox" name="hobby[]" id="programme" checked><label for="programme">编程</label>
  126. </div>
  127. </section>
  128. <section>
  129. <label for="remark">签&nbsp;&nbsp;&nbsp;&nbsp;名:</label>
  130. <textarea name="remark" id="remark" cols="30" rows="1"></textarea>
  131. </section>
  132. <section>
  133. <button type="submit">提交</button>
  134. </section>
  135. </form>
  136. </div>
  137. </main>
  138. </div>
  139. <!-- 页脚 -->
  140. <footer>
  141. <section>
  142. <ul>
  143. <li><a href="">网站地图01</a></li>
  144. <li><a href="">网站地图02</a></li>
  145. <li><a href="">网站地图03</a></li>
  146. <li><a href="">网站地图04</a></li>
  147. </ul>
  148. </section>
  149. </footer>
  150. </body>
  151. </html>
声明:本文内容转载自脚本之家,由网友自发贡献,版权归原作者所有,如您发现涉嫌抄袭侵权,请联系admin@php.cn 核实处理。
全部评论
文明上网理性发言,请遵守新闻评论服务协议