1. 程式人生 > 實用技巧 >Html5 語義化標籤

Html5 語義化標籤

<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<style>
    html {
        font-size: 30px;
        color: #ffffff;
        line-height: 1.5;
        font-family: Arial, Helvetica;
        background: #F2F2F2;
    }
    
    body {
        margin: 0 auto;
        padding: 0;
        max-width: 1200px;
        min-width: 360px;
        width: 1200px;
    }
    
    header,
    nav,
    footer {
        height: 80px;
        width: auto;
        margin-bottom: 20px;
        text-align: center;
        line-height: 80px;
        background-color: yellowgreen;
    }
    
    section {
        display: flex;
        justify-content: space-between;
        width: 100%;
    }
    
    section>article {
        width: 500px;
        height: 500px;
        text-align: center;
        line-height: 500px;
        background-color: yellowgreen;
    }
    
    footer {
        margin-top: 20px;
    }
</style>

<body>
    <header>herder</header>
    <nav>nav</nav>
    <section>
        <article>article</article>
        <article>article</article>
    </section>
    <footer>footer</footer>
</body>

</html>