參加網易云課堂的一個Python課程。這是我第一次做的一個簡單網頁。雖然是按照老師的代碼敲的,但敲完代碼后能實現一個網頁還是給了我繼續學習的信心。網頁如下圖
QQ截圖20161216213650.png
代碼如下:
<!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="150" height="150" alt="Picl">
</li>
<li>
<img src="images/0003.jpg" width="150" height="150" alt="Pic2">
</li>
<li>
<img src="images/0004.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>
</div>
<div class="footer">
<p>©: Mugglecoding</p>
</div>
</body>
</html>
總結:
1.了解了網頁常見的三種文件類型,js,css,HTML。
2.網頁的結構一般是三部分,header,body和footer。把網頁分割為這三部分,再根據每個部分添加各種樣式、圖片。
3.HTML標簽一般都有頭有尾,
這個特殊,不用結束標簽
4.通過查詢文檔,了解每個標簽的作用、樣式如何引用