Blogger Information
Blog 47
fans 1
comment 0
visits 53061
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
HTML+CSS 基础测试题(附带答案)
晴天
Original
7367 people have browsed it

11 期第一周测试题

满分 100, 同学们测试一下自己可以得多少分? 考试时间要求 90 分钟之内完成, 80 分为合格

[toc]

1. 单选题

每题 5 分,共 25 分

  • (1). phpStudy 是___b__

    • a:前端集成开发环境; b: php 集成开发环境;
  • (2). 小皮面板是___b___

    • a: Linux 系统; b: 主机管理系统;
  • (3). html 元素是由___b__描述的

    • a: 属性; b: 标签
  • (4). css 的功能是___b____

    • a: 控制页面元素的行为; b: 控制页面元素的样式
  • (5). <table>____a___类型的元素

    • a: 块级; b: 行内

2. 填空题

每题 5 分,共 40 分

  1. html 元素的三大通用属性是: id, class___style_____;
  2. html5 是创建页眉使用<header>元素, 页脚使用__<footer></footer>____元素
  3. 表单按钮中设置提交类型使用的属性是: ___formmeathed_______,处理脚本的属性是:_____formaction________;
  4. <a>元素除了页面跳转外, 还可以实现发邮件,打电话, ____下载________锚点______;
  5. 设置字体图标,如果使用unicode方式,应该使用的字体属性是__@font-face_____
  6. <meta charset="UTF-8" />的意思是: _________设置默认字符编码集格式__________________________

3. 编程题

第一题: 20 分, 第二题 15 分, 共: 35 分

  1. 写一个用户注册表单,要求用到文本框,密码框,单选框,复选框, 下拉列表, 复合列表, 文本域, 提交按钮

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>用户注册</title>
  7. <link rel="stylesheet" href="register.css" />
  8. </head>
  9. <body>
  10. <form action="" method="post" id="register"></form>
  11. <fieldset form="register">
  12. <legend>用户注册</legend>
  13. <!-- 必填项 -->
  14. <main>
  15. <!-- 用户名 -->
  16. <section>
  17. <label for="username">用户名:</label>
  18. <input
  19. type="text"
  20. id="username"
  21. name="username"
  22. form="register"
  23. placeholder="请输入6-10位用户名"
  24. minlength="6"
  25. maxlength="10"
  26. required
  27. autofocus
  28. />
  29. <label for="username"><span class="iconfont">&#xe623;</span></label>
  30. </section>
  31. <!-- 密码 -->
  32. <section>
  33. <label for="password">密码:</label>
  34. <input
  35. type="password"
  36. id="password"
  37. name="password"
  38. form="register"
  39. placeholder="请输入8-16位密码"
  40. minlength="8"
  41. maxlenth="16"
  42. required
  43. />
  44. <label for="password"><span class="iconfont">&#xe632;</span></label>
  45. </section>
  46. <!-- 邮箱 -->
  47. <section>
  48. <label for="email">邮箱:</label>
  49. <input
  50. type="email"
  51. id="email"
  52. name="email"
  53. form="register"
  54. placeholder="请输入邮箱"
  55. required
  56. />
  57. <label for="email"><span class="iconfont">&#xe72d;</span></label>
  58. </section>
  59. <!-- 年龄 -->
  60. <section>
  61. <label for="age">年龄:</label>
  62. <input
  63. type="number"
  64. max="60"
  65. min="18"
  66. value="20"
  67. form="register"
  68. id="age"
  69. name="age"
  70. />
  71. <label for="age"><span class="iconfont">&#xe69d;</span></label>
  72. </section>
  73. <!-- 性别 -->
  74. <section>
  75. <label for="secret">性别:</label>
  76. <div class="gender">
  77. <input
  78. type="radio"
  79. name="gender"
  80. id="male"
  81. form="register"
  82. value="male"
  83. />
  84. <label for="male"></label>
  85. <input
  86. type="radio"
  87. name="gender"
  88. id="female"
  89. value="female"
  90. form="register"
  91. />
  92. <label for="female"></label>
  93. <input
  94. type="radio"
  95. name="gender"
  96. id="secret"
  97. form="register"
  98. value="secret"
  99. checked
  100. />
  101. <label for="secret">保密</label>
  102. </div>
  103. </section>
  104. <!-- 兴趣 -->
  105. <section>
  106. <label for="">兴趣:</label>
  107. <div class="hobby">
  108. <input
  109. type="checkbox"
  110. name="hobby[]"
  111. form="register"
  112. id="shoot"
  113. value="shoot"
  114. checked
  115. /><label for="shoot">摄影</label>
  116. <input
  117. type="checkbox"
  118. name="hobby[]"
  119. form="register"
  120. id="travel"
  121. value="travel"
  122. /><label for="travel">旅游</label>
  123. <input
  124. type="checkbox"
  125. name="hobby[]"
  126. form="register"
  127. id="programme"
  128. value="programme"
  129. checked
  130. /><label for="programme">编程</label>
  131. </div>
  132. </section>
  133. <!-- 意向课程 -->
  134. <section>
  135. <label for="teacher">意向课程:</label>
  136. <input
  137. type="text"
  138. id="teacher"
  139. name="teacher"
  140. form="register"
  141. list="table"
  142. required
  143. />
  144. <datalist id="table">
  145. <option value="HTML开发与实战" label="HTML开发与实战"></option>
  146. <option
  147. value="JavaScript开发与实战"
  148. label="JavaScript开发与实战"
  149. ></option>
  150. <option value="CSS3开发与实战" label="CSS3开发与实战"></option>
  151. <option value="PHP开发与实战" label="PHP开发与实战"></option>
  152. <option value="MySQL开发与实战" label="MySQL开发与实战"></option>
  153. </datalist>
  154. </section>
  155. <!-- 报名课程 -->
  156. <section>
  157. <label for="">报名课程:</label>
  158. <select name="enlist" id="enlist" form="register">
  159. <optgroup label="前端">
  160. <option value="HTML开发与实战" label="HTML开发与实战"></option>
  161. <option value="CSS3开发与实战" label="CSS3开发与实战"></option>
  162. <option
  163. value="JavaScript开发与实战"
  164. label="JavaScript开发与实战"
  165. ></option>
  166. </optgroup>
  167. <optgroup label="后端">
  168. <option value="PHP开发与实战" label="PHP开发与实战"></option>
  169. <option value="MySQL开发与实战" label="MySQL开发与实战"></option>
  170. <option
  171. value="Laravel开发与实战"
  172. label="Laravel开发与实战"
  173. ></option>
  174. </optgroup>
  175. <optgroup label="全选">
  176. <option value="全选选择" label="全部选择"></option>
  177. </optgroup>
  178. </select>
  179. </section>
  180. <!-- 留言 -->
  181. <section>
  182. <label for="">给我留言:</label>
  183. <textarea
  184. name="say"
  185. id="say"
  186. form="register"
  187. cols="30"
  188. rows="10"
  189. placeholder="说点什么吧..."
  190. required
  191. ></textarea>
  192. </section>
  193. <!-- 提交 -->
  194. <button
  195. form="register"
  196. formmethod="POST"
  197. formaction="register.php"
  198. formtarget="_black"
  199. >
  200. 提交
  201. </button>
  202. </main>
  203. </fieldset>
  204. </body>
  205. </html>

CSS 部分

  1. @font-face {
  2. font-family: "iconfont"; /* project id 1741431 */
  3. src: url("//at.alicdn.com/t/font_1741431_zqb14mva9sj.eot");
  4. src: url("//at.alicdn.com/t/font_1741431_zqb14mva9sj.eot?#iefix") format("embedded-opentype"),
  5. url("//at.alicdn.com/t/font_1741431_zqb14mva9sj.woff2") format("woff2"),
  6. url("//at.alicdn.com/t/font_1741431_zqb14mva9sj.woff") format("woff"), url("//at.alicdn.com/t/font_1741431_zqb14mva9sj.ttf")
  7. format("truetype"),
  8. url("//at.alicdn.com/t/font_1741431_zqb14mva9sj.svg#iconfont") format("svg");
  9. }
  10. .iconfont {
  11. font-family: "iconfont" !important;
  12. font-size: 16px;
  13. font-style: normal;
  14. -webkit-font-smoothing: antialiased;
  15. -moz-osx-font-smoothing: grayscale;
  16. }
  17. fieldset {
  18. border: none;
  19. border: 5px solid lightblue;
  20. border-radius: 30px;
  21. width: 500px;
  22. margin: auto;
  23. margin-top: 20px;
  24. }
  25. legend {
  26. text-align: center;
  27. font-size: 1.5rem;
  28. }
  29. span {
  30. }
  31. .gender {
  32. display: inline;
  33. }
  34. .hobby {
  35. display: inline;
  36. }
  1. 写一个商品信息表,要求用到表格区域划分, 表格单元的行与列的合并等
  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>商品信息表</title>
  7. <style>
  8. table {
  9. width: 300px;
  10. border: 3px solid lightblue;
  11. border-radius: 5px;
  12. color: lightcoral;
  13. }
  14. caption {
  15. text-align: center;
  16. }
  17. th,
  18. tr,
  19. td {
  20. border: 1px solid lightblue;
  21. }
  22. </style>
  23. </head>
  24. <body>
  25. <table boder="3" cellspacing="0" cellpadding="5">
  26. <caption>
  27. 商品信息表
  28. </caption>
  29. <thead>
  30. <th>区域</th>
  31. <th>商品名</th>
  32. <th>原价</th>
  33. <th>会员价</th>
  34. </thead>
  35. <tbody>
  36. <tr>
  37. <td rowspan="3">零食区</td>
  38. <td>薯片</td>
  39. <td>10</td>
  40. <td>5</td>
  41. </tr>
  42. <tr>
  43. <td>饼干</td>
  44. <td>40</td>
  45. <td>8</td>
  46. </tr>
  47. <tr>
  48. <td>瓜子</td>
  49. <td>8</td>
  50. <td>3</td>
  51. </tr>
  52. </tbody>
  53. </table>
  54. </body>
  55. </html>
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