美文网首页
Python爬虫小分队二期学习进展:第一天

Python爬虫小分队二期学习进展:第一天

作者: dpkBat | 来源:发表于2017-05-19 16:03 被阅读0次

    HTML语法学习

    参考资料:HTML 基础教程

    学习的内容

    1. 了解html文档的基本结构
    • 标签的写法,常用标签

    HTML 元素以开始标签起始
    HTML 元素以结束标签终止

    • 标签嵌套
    <html>
    <body>    
      <p>This is my first paragraph.</p>
    </body>
    </html>
    
    1. 了解常用的标签
    • a
    <a href="http://www.w3school.com.cn">This is a link</a>
    
    • p
    <p>This is my first paragraph.</p>
    
    • div
    <div style="color:#00FF00">
      <h3>This is a header</h3>
     <p>This is a paragraph.</p>
    </div>
    
    • img

    <img src="//www.baidu.com/img/bd_logo1.png" />

    • h1~h6
    <h1>This is heading 1</h1>
    <h2>This is heading 2</h2>
    <h3>This is heading 3</h3>
    <h4>This is heading 4</h4>
    <h5>This is heading 5</h5>
    <h6>This is heading 6</h6>
    
    1. html标签属性
      HTML 链接由 <a> 标签定义,链接的地址在 href 属性中指定
    <a href="http://www.w3school.com.cn">This is a link</a>
    
    1. html段落
      段落是通过<p>标签定义的。
    <p>This is a paragraph</p>
    <p>This is another paragraph</p>
    
    1. html url

    语法:scheme://host.domain:port/path/filename

    • scheme - 定义因特网服务的类型。最常见的类型是 http,https,ftp,file
    • host - 定义域主机(http 的默认主机是 www)
    • domain - 定义因特网域名,比如 w3school.com.cn
    • :port - 定义主机上的端口号(http 的默认端口号是 80)
    • path - 定义服务器上的路径(如果省略,则文档必须位于网站的根目录中)。
    • filename - 定义文档/资源的名称

    以百度首页为例:https://www.baidu.com:443/index.html

    • scheme - 因特网服务的类型为https
    • host - 域主机是 www
    • domain - 因特网域名baidu.com
    • :port - 主机上的端口号443
    • path - 省略,表示服务器上的路径为网站的根目录中。
    • filename - 文档名称为index.html

    相关文章

      网友评论

          本文标题:Python爬虫小分队二期学习进展:第一天

          本文链接:https://www.haomeiwen.com/subject/lopyxxtx.html