HTML og CSS for grafiske designere

    <!DOCTYPE html>
    <html lang="no">
    <head>
        <meta charset="UTF-8">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <meta http-equiv="X-UA-Compatible" content="ie=edge">
        <title>Gløers bistro</title>
        <link rel="stylesheet" href="index.css">
    </head>
    <body>
        <h1>Dagens meny</h1>
        <p>Dagens meny er hentet rett fra havet. Det er sjømat dor alle penga!</p>
        <h2>Foretter</h2>
        <ul>
    html, body {
        margin: 0;
        padding: 0;
    }
    
    body {
        background-color: coral;
    }
    
    main section {
        background-color: crimson;
        color: white;
        max-width: 400px;
        
    * {
        margin: 0;
        box-sizing: border-box;
    }
    h1 {
        margin: 0;
    }
    html, body {
        margin: 0;
        padding: 0;
    }
    
    main section {
        background-color: coral;
    * {
        margin: 0;
        box-sizing: border-box;
    }
    h1 {
        margin: 0;
    }
    html, body {
        margin: 0;
        padding: 0;
    }
    html {
        scroll-behavior: smooth;
    }
    body {
        text-align: center;
    }
    
    img {
        width: 300px;
    }
    <html>
        <head>
            <link rel="stylesheet" href="styles/index.css">
        </head>
        <body>
            <h1>Spagetti</h1>
             <img src="images/pasta.jpeg" title="Nå ble jeg sulten!!!">     
             <img src="images/night-tomato.jpg" alt="En fristende matrett."> 
        </body>
    </html>
    /* Nullstiller marger */
    html, body, h1, h2, p {
        margin: 0;
    }
    
    body {
        padding-top: 32px;
        padding-left: 16px;
        padding-right: 16px;
        padding-bottom: 64px;
        font-family: Georgia, 'Times New Roman', Times, serif;
    }
    
    h1, h2 {
    /* Nullstiller marger */
    html, body, h1, h2, p {
        margin: 0;
    }
    
    body {
        padding-top: 32px;
        padding-left: 16px;
        padding-right: 16px;
        padding-bottom: 64px;
        font-family: Georgia, 'Times New Roman', Times, serif;
    }
    
    h1, h2 {
    body {
        
    }
    
    img {
        width: 150px;
        float: left;
        margin-right: 16px;
        margin-bottom: 16px
    }
    #tomat {
        color: white;
        text-align: center;
        padding-top: 80px;
        box-sizing: border-box;
        height: 400px;
        
        background-image: url("../night-tomato.jpg");
        background-size: cover;
        background-position: center bottom;
        background-repeat: no-repeat;
        
    }
    html, body {
        margin: 0;
        padding: 0;
    }
    
    header {
        background-color: #dd0000;
    }
    
    header nav {
        display: grid;
        grid-auto-flow: column;
        justify-content: start;
        grid-gap: 12px;  
    html, body {
        margin: 0;
        padding: 0;
    }
    
    .bilder {
        display: grid;
        grid-template-columns: 1fr 1fr 1fr;
        grid-gap: 16px;
    }
    
    .bilder img {
        width: 100%;
    }
    body {
        padding: 16px;
        background-color: #eee;
    }
    
    .nyheter {
        display: grid;
        grid-template-columns: 1fr 1fr;
        grid-gap: 16px;
    }
    
    .nyheter article {
        background-color: white;
        box-shadow: 0 0 2px black;    
    /* Nullstiller marger */
    html, body, h1, h2, p {
        margin: 0;
    }
    
    body {
        padding-top: 32px;
        padding-left: 16px;
        padding-right: 16px;
        padding-bottom: 64px;
        font-family: Georgia, 'Times New Roman', Times, serif;
    }
    
    h1, h2 {
Gløer Langslet4:168 months ago
En innføring i HTML og CSS