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

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

作者: 飞飞幻想 | 来源:发表于2016-05-25 01:44 被阅读0次

    学习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元素

    相关文章

      网友评论

          本文标题:Python实战计划学习1-1:做一个网页

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