Pesquisar neste blog

14/08/2020

Propriedade Display em HTML

<!DOCTYPE html>
<html>

<head>
    <meta charset="UTF-8">
    <title>Display</title>
    <style>
        body {
            font-size40px;
            color#fff;/*cor do texto*/
            background-colorcoral;/*cor do plano de fundo*/
        }

        ul{padding0;}
        div{background-colorseagreen;}/*cor de fundo da div*/
        spanbackground-colorred;}
        libackground-colorpurple;}

        divspanli
            width50%/*largura*/
            width200px;
            height80px;/*altura*/
            padding-top30px;
            text-aligncenter;/*texto centralizado*/
            /*display: block;/*blocos*/
            /*display: inline;/*linhas*/
            displayinline-block;

        }
    </style>
</head>

<body>
    <div>Texto 1</div>
    <span>Texto 2</span>
    <span>Texto 3</span>
    <ul>
        <li>Item 1</li>
        <li>Item 2</li>
        <li>Item 3</li>
    </ul>
</body>

</html>


Nenhum comentário: