Python实战计划学习1-1:做一个网页

学习Python第一天,做了一个网页
网页效果如下:


我的代码:

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <link rel="stylesheet" href="main.css" />
    <title>The blah</title>
</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="150px" height="150px"/></li>
            <li><img src="images/0002.jpg" width="150px" height="150px"/></li>
            <li><img src="images/0003.jpg" width="150px" height="150px"/></li>
        </ul>
        <p>
            stretching from Solta to Mljet, and this unique cycling trip captures the highlights with an ideal
            balance of activity, culture and relaxation. Experience the beautiful island of Korcula with its picturesque old town,
            the untouched beauty of Vis, and trendy Hvar with its Venetian architecture. In the company of a cycling guide,
        </p>
    </div>
    <div class="footer">
        <p>© Mugglecoding</p>
    </div>

</body>
</html>

总结:

  • 尽量使用标签的原来语义,不要乱用div
  • 先使用div搭好整体架构,然后再一一填充其它html元素
最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容

  • Android 自定义View的各种姿势1 Activity的显示之ViewRootImpl详解 Activity...
    passiontim阅读 173,860评论 25 709
  • 简介网络浏览器很可能是使用最广的软件。在这篇入门文章中,我将会介绍它们的幕后工作原理。我们会了解到,从您在地址栏输...
    wengjq阅读 2,096评论 2 15
  • <a name='html'>HTML</a> Doctype作用?标准模式与兼容模式各有什么区别? (1)、<...
    clark124阅读 3,584评论 1 19
  • 很小的时候,因为自己的笨经常做不好事情,不讨别人的喜欢。爷爷奶奶、叔叔们和爸爸是真的将我当手心的宝护着,妈妈...
    竹妮阅读 435评论 0 1
  • Google等美国高新企业也会让员工冥想,有人将其译文Meditation,也有人认为Mindfulness就是冥...
    呆呆六六阅读 406评论 0 0