Python爬虫实战项目第一节课学习笔记

第一次没看懂,不知所以然,专门学了一天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"等等
  • 对标签的使用更加熟练了,而且能记住很久
最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容