第一节的网页练习。
我的代码
<!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">
![](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>
![](images/0001.jpg)
</li>
<li>
![](images/0004.jpg)
</li>
<li>
![](images/0003.jpg)
</li>
</ul>
<p>
Have a good day!<br>Have a good day!<br>Have a good day!<br>Have a good day!Have a good day!Have a good day!Have a good day!Have a good day!Have a good day!
</p>
</div>
<div class="footer">
<p>© Carrie2017</p>
</div>
</body>
</html>
总结
- 理解了网页的结构
div
作为网页的框架,让页面的结构更清晰, - css 真的好强大,练习的中间,没套用css发现网页像文本一样,有了css页面就有个色彩
- 用
<br>
可以强制的换行