1
以下是云阅读的畅销书排行榜效果图,请写出其中的HTML代码
(8分)
HTML考察点:
标题用h标签;
内容用有序列表ol,li实现;
每一条内容用a标签表示,a标签内有title属性。
2
(8分)
请实现以下效果图的HTML部分
HTML考察点:
表格标题用caption标签或者h标签;
表格内部thead,tbody分隔;
表头单元格用th表示;
用rowspan实现跨行;
总体实现要求.
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<titile></title>
<style>
table{
margin-right: 20px;
margin-left: 20px;
border: thin solid gray;
border-collapse: collapse;
}
td,th{
border: thin solid gray;
padding: 5px;
}
th{background-color: gray;}
</style>
</head>
<body>
<table>
<caption>运费详情</caption>
<tr>
<th>区域</th>
<th>寄达地</th>
<th>首重(元/1000g)</th>
<th>续重(元/1000g)</th>
</tr>
<tr>
<th rowspan="2">一区</th>
<td>浙江、上海、江苏</td>
<td>6</td>
<td>1</td>
</tr>
<tr>
<td>江西、安微</td>
<td>7</td>
<td>1</td>
</tr>
<tr>
<th>二区</th>
<td>吉林、黑龙江、云南</td>
<td>10</td>
<td>6</td>
</tr>
<tr>
<th>三区</th>
<td>新疆、西藏</td>
<td>15</td>
<td>10</td>
</tr>
</table>
</body>
</html>```
>3
(12分)
请实现以下效果图的HTML部分
![](http://upload-images.jianshu.io/upload_images/316258-6733a923cc83f954.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
//HTML
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>code</title>
<link rel="stylesheet" href="try.css">
</head>
<body>
<form>
<div class="tableRow">
<label for="head">头像</label>
<input type="file" id="head">
</div>
<div class="tableRow">
<label for="nickname">昵称</label>
<input type="text" name="nickname" id="nickname">
</div>
<div class="tableRow">
<label for="degree">学历</label>
<p>
<select class="ui-select" name="degree" id="degree">
<option value="college" checked>大专</option>
<option value="undergraduate">本科</option>
</select>
</p>
</div>
<div class="tableRow">
<label>性别</label>
<p>
<input type="radio" value="man" id="sex_man" checked >
<label for="sex_man">男</label>
<input type="radio" value="women" id="sex_woman">
<label for="sex_woman">女</label>
</p>
</div>
<div class="tableRow">
<label>爱好</label>
<p>
<input type="checkbox" value="movie" id="movie_hobby">
<label for="movie_hobby">电影</label>
<input type="checkbox" value="shoot" id="shoot_hobby">
<label for="shoot_hobby">摄影</label>
<input type="checkbox" value="music">
<label for="music_hobby">音乐</label>
<input type="checkbox" value="read">
<label for="read_hobby">阅读</label>
</p>
</div>
<div class="tableRow">
<label for="signature">签名</label>
<textarea name="" id="signature" cols="45" rows="5"></textarea>
</div>
<div class="tableRow">
<label></label>
<button type="submit">保存</button>
</div>
</form>
</body>
</html>```
//CSS
body{
margin:20px;
}
form{
display:table;
padding:10px;
}
form textarea{
display: table-cell;
width:300px;
height:100px;
}
div.tableRow {
display:table-row;
}
div.tableRow > p, div.tableRow > label, div.tableRow > input {
display: table-cell;
vertical-align: top;
padding: 10px;
}
div.tableRow label:first-child {
text-align: right;
padding: 10px;
}```
Q1:form的padding和margin分别指的是什么?
Q2:<input type="" name="" value="">其中name和value指的是什么?有什么用?
Q3:实现结果 【昵称 的text框】和【签名 的textarea框】和其他元素没有对齐,为什么?如何对齐?
![QQ截图20170303233424.png](http://upload-images.jianshu.io/upload_images/316258-6ec83c0a587483bb.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)