Python爬虫实战项目第一节课学习笔记
2016-09-15 本文已影响0人
Davy_yu
第一次没看懂,不知所以然,专门学了一天HTML和CSS样式,才知道是怎么一回事,建议后来的学生还是先去了解HTML和CSS,不然完全把老师的代码抄一遍没有意义
显示成果
第一节课作业效果.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> When I wrote the following pages, or rather the bulk of them, I lived alone,
in the woods, a mile from any neighbor, in a house which I had built myself,
on the shore of Walden Pond, in Concord, Massachusetts, and earned my living
by the labor of my hands only. I lived there two years and two months. At present
I am a sojourner in civilized life again.
I should not obtrude my affairs so much on the notice of my readers if very particular
</p>
</div>
<div class="footer">
<p>©MUGGLECODING</p>
</div>
</body>
</html>
总结
- 了解HTML很重要,不然无法理解为什么要用 等标签
- 了解CSS很重要,不然无法理解为什么引用的类名必须是"header","photos","nav"等等
- 对标签的使用更加熟练了,而且能记住很久