今天是學(xué)習(xí)Python的第二天,昨天看過(guò)教程后,信心滿滿,今天就馬上做了后面的練習(xí)!
最終成果是這樣的:
Paste_Image.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">
</li>
<li>
<img src="images/0003.jpg" width="150" height="150">
</li>
<li>
<img src="images/0004.jpg" width="150" height="150">
</li>
</ul>
<p>
For other uses, see Beach (disambiguation).
"Sand beach" redirects here. For other uses, see Sand Beach (disambiguation).
A sand and shingle beach
A beach is a landform along the coast of an ocean or sea. It usually consists
of loose particles, which are often composed of rock, such as sand, gravel, shingle,
pebbles, or cobblestones. The particles comprising a beach are occasionally biological
in origin, such as mollusc shells or coralline algae.
Some beaches have man-made infrastructure, such as lifeguard posts, changing rooms,
and showers. They may also have hospitality venues (such as resorts, camps, hotels,
and restaurants) nearby. Wild beaches, also known as undeveloped or undiscovered beaches,
are not developed in this manner. Wild
beaches can be valued for their untouched
beauty and preserved nature.
Beaches typically occur in areas along the coast where wave or current action
deposits and reworks sediments.
</p>
</div>
<div class="footer">
<P>?Beach</P>
</div>
</body>
</html>
總結(jié)
- css樣式寫(xiě)好之后,我們就可以直接套用樣式了,非常方便。
- 只有<body>里面的內(nèi)容才會(huì)顯示在網(wǎng)頁(yè)上面。
- 不同區(qū)域的內(nèi)容用div標(biāo)簽來(lái)分開(kāi)。
- <hr />可以畫(huà)出一條橫線。
- css樣式文件和圖片文件夾最好擺放在同一個(gè)文件夾,否則路徑必須寫(xiě)仔細(xì)。