Python实战计划学习笔记1-1:做一个简单的网页

新手学习python第一天,做了一个简单的网页。

最终成果:

2016-11-09 17-16-05屏幕截图.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" alt="Pic1"></li>
                <li><img src="images/0003.jpg" width="150" height="150" alt="Pic1"></li>
                <li><img src="images/0004.jpg" width="150" height="150" alt="Pic1"></li>
        </ul>
        <p>John Lennon once said,‘Life is what’s happening while we’re busy making other plans.
            ’When we’re busy making ‘other plans’,our children are busy growing up,
            the people we love are moving away and dying,our bodies are getting out of shape,
            and our dreams are slipping away.In short,we miss out on life.
        </p>
        <hr>
    </div>
    <div class="footer">
        <p>©Mugglecoding</p>
    </div>
</body>
</html>



总结:

  • 要确保网页文件和图片在一个文件夹里
  • css是现成的直接在html里引用就行
  • 学会了标签的使用方式

  • 只用一个开始标签
  • 感觉良好,对学习python充满信心
最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容