按照第一周第一節(jié)課課程安排做了一個(gè)網(wǎng)頁裹芝,網(wǎng)頁效果如下:
我的代碼如下:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>The blah</title>
<link rel="stylesheet" type="text/css" href="homework.css">
</head>
<body>
<div class="header">
<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>
</div>
<div class="main-content">
<h2>The Beach</h2>
<hr>
<ul class="photos">
<li><img src="images/0001.jpg" width="150px" height="150px"></li>
<li><img src="images/0002.jpg" width="150px" height="150px"></li>
<li><img src="images/0003.jpg" width="150px" height="150px"></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>
</div>
<div class="footer">
<p>© Mugglecoding Zing</p>
</div>
</body>
</html>
總結(jié):
- 一個(gè)完整的網(wǎng)頁有三部分構(gòu)成html css 和Javascript 爬蟲主要對html和css抓取就可以了
- 主要用到的標(biāo)簽有:
<p>
<ul>
<li>
<div>
<img>
<hr>
<h2>
- 網(wǎng)頁的框架都是由
<div>
構(gòu)建大框架兄春,再用對應(yīng)的功能標(biāo)簽嵌套。