第六题
编写一个完整的 HTML 页面。
要求
页面中包含一个表单,表单的action为/login.html,表单中的内容从上到下依次为:
- 一个
text类型的input标签。
name为:usernameid为:username- 具有
required属性 minlength为:3maxlength为:15placeholder为:用户名label的文本为:用户名
- 一个
number类型的input标签。
name为:ageid为:age- 具有
required属性 placeholder为:年龄label的文本为:年龄
- 一个
email类型的input标签
name为:emailid为:email- 具有
required属性 placeholder为:邮箱label的文本为:邮箱
- 一个
password类型的input标签
name为:passwordid为:password- 具有
required属性 placeholder为:密码label的文本为:密码
- 一个
textarea标签
name为:resumeid为:resume- 没有
required标签 placeholder为:个人简介label的文本为:个人简介
- 一个
select标签
name为:langid为:langlabel的文本为:语言- 第一个
option:value为Cpp,文本为:Cpp - 第二个
option:value为Java,文本为:Java - 第三个
option:value为Python,文本为:Python
- 一个按钮
type为submit- 文本为:
提交
代码:
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Document</title> </head> <body> <form action="/login.html"> <label for="username">用户名</label> <input required placeholder="用户名" minlength="3" maxlength="15" type="text" name="username" id="username"> <label for="age">年龄</label> <input type="number" name="age" required id="age" placeholder="年龄"> <label for="email">邮箱</label> <input type="email" name="email" id="email" required placeholder="邮箱"> <label for="password">密码</label> <input type="password" name="password" id="password" required placeholder="密码"> <label for="resume">个人简介</label> <textarea cols="30" rows="10" name="resume" id="resume" placeholder="个人简介"></textarea> <label for="lang">语言</label> <select type="select" name="lang" id="lang"> <option value="Cpp">Cpp</option> <option value="Java">Java</option> <option value="Python">Python</option> </select> <button type="submit">提交</button> </form> </body> </html>
第七题
编写一个完整的 HTML 页面。
要求
页面中包含一个有序列表:
- 列表第一项只包含一个文本,内容为:
第一讲
- 列表第二项包含:
- 一个文本,内容为:
第二讲 - 一个无序列表,包含3项,均为文本,内容分别为:
第一小节、第二小节、第三小节。
- 列表第三项包含:
- 一个文本,内容为:
第三讲 - 一个有序列表,包含3项,均为文本,内容分别为:
第一小节、第二小节、第三小节。
代码:
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Document</title> </head> <body> <ol> <li>第一讲</li> <li> 第二讲 <ul> <li>第一小节</li> <li>第二小节</li> <li>第三小节</li> </ul> </li> <li> 第三讲 <ol> <li>第一小节</li> <li>第二小节</li> <li>第三小节</li> </ol> </li> </ol> </body> </html>
第八题
编写一个完整的 HTML 页面。
要求
页面中包含一个表格,要求:
- 表格的标题为:
成绩单 - 表格的内容为:
| 姓名 | 数学 | 语文 | 英语 |
| Alice | 100 | 99 | 98 |
| Bob | 99 | 98 | 97 |
| Tom | 98 | 97 | 96 |
代码:
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Document</title> </head> <body> <table> <caption>成绩单</caption> <thead> <tr> <th>姓名</th> <th>数学</th> <th>语文</th> <th>英语</th> </tr> </thead> <tbody> <tr> <td>Alice</td> <td>100</td> <td>99</td> <td>98</td> </tr> <tr> <td>Bob</td> <td>99</td> <td>98</td> <td>97</td> </tr> <tr> <td>Tom</td> <td>98</td> <td>97</td> <td>96</td> </tr> </tbody> </table> </body> </html>
第九题
编写一个完整的 HTML 页面。
要求
内容包括四个部分:
header区:
- 包含
<h3>标题,内容为:我的收藏夹
section区,从上到下依次为:
- 包含
<h4>标题,内容为:图片 - 第一个
<figure>,包含一个<img>,src为/images/logo.png,宽度为100px,<figcaption>的文本为:logo - 第二个
<figure>,包含一个<img>,src为/images/mountain.jpg,宽度为100px,<figcaption>的文本为:山
section区,从上到下依次为:
- 包含
<h4>标题,内容为:古诗 - 第一个
<article>,包含一个<h5>标题,内容为:春晓,之后包含一个段落,内容为:春眠不觉晓,处处闻啼鸟。夜来风雨声,花落知多少。 - 第二个
<article>,包含一个<h5>标题,内容为:咏柳,之后包含一个段落,内容为:碧玉妆成一树高,万条垂下绿丝绦。不知细叶谁裁出,二月春风似剪刀。
footer区
- 包含一行文本:
©2018-2022 Me 版权所有
代码:
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Document</title> </head> <body> <header> <h3>我的收藏夹</h3> </header> <section> <h4>图片</h4> <figure> <img width="100" src="/images/logo.png"> <figcaption>logo</figcaption> </figure> <figure> <img width="100" src="/images/mountain.jpg"> <figcaption>山</figcaption> </figure> </section> <section> <h4>古诗</h4> <article> <h5>春晓</h5> <p> 春眠不觉晓,处处闻啼鸟。夜来风雨声,花落知多少。 </p> </article> <article> <h5>咏柳</h5> <p> 碧玉妆成一树高,万条垂下绿丝绦。不知细叶谁裁出,二月春风似剪刀。 </p> </article> </section> <footer>©2018-2022 Me 版权所有</footer> </body> </html>
第十题
编写一个完整的 HTML 页面。
要求
页面中包含一行如下内容:
©<Web>版权所有
代码:
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Document</title> </head> <body> ©<Web>版权所有 </body> </html>