Set the top and bottom margins for <h1> to "50px", and left and right margins to "25px". - HTML CSS CSS

HTML CSS examples for CSS:Quiz

Description

Set the top and bottom margins for <h1> to "50px", and left and right margins to "25px".

Demo Code

ResultView the demo in separate window

<!DOCTYPE html>
<html>
<head>
<style>
h1 {<!--from ww w . ja  va  2  s .  com-->
    background-color: pink;
    margin: 50px 25px;
}
</style>
</head>
<body>

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

</body>
</html>

Related Tutorials