新手學(xué)習(xí)python第一天笆搓,做了一個簡單的網(wǎng)頁逢捺。
最終成果:
2016-11-09 17-16-05屏幕截圖.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="Pic1"></li>
<li><img src="images/0003.jpg" width="150" height="150" alt="Pic1"></li>
<li><img src="images/0004.jpg" width="150" height="150" alt="Pic1"></li>
</ul>
<p>John Lennon once said车吹,‘Life is what’s happening while we’re busy making other plans.
’When we’re busy making ‘other plans’,our children are busy growing up,
the people we love are moving away and dying派任,our bodies are getting out of shape镰绎,
and our dreams are slipping away.In short秸侣,we miss out on life.
</p>
<hr>
</div>
<div class="footer">
<p>?Mugglecoding</p>
</div>
</body>
</html>
總結(jié):
- 要確保網(wǎng)頁文件和圖片在一個文件夾里
- css是現(xiàn)成的直接在html里引用就行
- 學(xué)會了標(biāo)簽的使用方式
-
只用一個開始標(biāo)簽 - 感覺良好逸贾,對學(xué)習(xí)python充滿信心