<html> <head> <style> h1 { position:relative; left:40px; } </style> </head> <body> <h1>Heading A</h1> <p>This is a paragraph.</p> <h1>Heading B</h1> <p>This is a paragraph.</p> <h1>Heading C</h1> <p>This is a paragraph.</p> <h1>Heading D</h1> <p>This is a paragraph.</p> </body> </html>
Your Result:
Edit the code above and click to see the result.
W3Schools.com
- Try it yourself