1.1
如下图所示这时需要制成的简单网页
网页界面被划分成3块区域,分别为header main-content 以及footer对应着图中的三个位置
既然如此先把总的代码框架写出来
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
</head>
<body>
</body>
</html>
<body> </body>时所需要添加的内容,就是上面所提到的三个部分
在此之前我们需要引入CSS模块,修改<head> </head>中的内容如下:
<head>
<meta charset="UTF-8">
<title>The blah</title>
<link rel="stylesheet" type="text/css" href="homework.css">
</head>
之后在body中添加内容
<div class="header"></div>
<div class="main-content"></div>
<div class="footer"></div>
在header中的名字the blah是图片样式,紧靠其下的Home Site Other并列且具有超链接。
<img src="images/blah.png>"
<ul class="nav">
<li><a href="#">Home</a></li>
<li><a href="#">Site</a></li>
<li><a href="#>Other</a></li>
</ul>
在main-content中元素是标题、分割线、3张图片并行排列,最后是一段文字。
<h2>The Beach</h2>
<hr>
<ul class="photos">
<li><img src="images/0001.jpg" width="150" height="150" alt="Pic1"></li>
<li><img src="images/0002.jpg" width="150" height="150" alt="Pic2"></li>
<li><img sec="images/0003.jpg" width="150" height="150" alt="Pic3"></li>
</ul>
<p>
stretching from Solta to Mljet, and this unique cycling trip captures the highlights with an ideal balance of activity, culture and relaxation. Experience the beautiful island of Korcula with its picturesque old town,
the untouched beauty of Vis, and trendy Hvar with its Venetian architecture. In the company of a cycling guide,
this stimulating journey explores towns and landscapes, many of which are on UNESCO's world heritage list.Aboard the comfortably appointed wooden motor yacht,
there is ample time between cycles to swim in the azure waters and soak up the ambience of seaside towns.
<\p>
最后的一部分则是以特殊的字体
<p>© Mugglecoding</p>
总结:
在对网页进行爬虫分析时需要对网页中各个模块的成分进行分析,因此最好的学习办法是亲自去学习一下最基础的网址的源代码属性。