HTML CSS Margin Code For Website - Learn About Website | DaddyFile

0

CSS And HTML Margin Explain

The CSS margin property defines a margin (space) outside the border:


Html Code:

<!DOCTYPE html>
<html>
<head>
<style>
p {
    border: 1px solid grey;
    padding: 10px;
    margin: 30px;
}
</style>
</head>
<body>

<h1>This is a heading</h1>

<p>This is a paragraph.</p>
<p>This is a paragraph.</p>
<p>This is a paragraph.</p>

</body>
</html>




Html Code Result:


Post a Comment

 
Top