Position the <h1> element 20px left, and 30px down, relative to its normal position. - HTML CSS CSS

HTML CSS examples for CSS:Quiz

Description

Position the <h1> element 20px left, and 30px down, relative to its normal position.

Demo Code

ResultView the demo in separate window

<!DOCTYPE html>
<html>
<head>
<style>
h1 {<!--   w  ww . j a v  a2 s . co m-->
    position: relative;
    top: 30px;
    left: -20px;
    color: red;
}
</style>
</head>
<body>

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

</body>
</html>

Related Tutorials