How to use CSS to define a space (padding) between the text and the border around HTML element

1 Answer

0 votes
<!DOCTYPE html>
<html>
    <head>
        <style>
            p {
                border: 1px solid lightgreen;
                padding: 20px;
            }
        </style>
    </head>
    <body>

        <p>Text text text</p>

    </body>
</html>

 



answered Dec 7, 2018 by avibootz
...