style.css
index.html
body { font-family: sans-serif; } body, section { padding: 20px; } section { background-image: url("tim.jpg"); background-size: cover; } h1 { font-size: 400%; }
<!DOCTYPE html> <html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <link href="/assets/styles/reset.css" rel="stylesheet"> <link href="style.css" rel="stylesheet"> </head> <body> <section> <h1>This is a heading</h1> <p>And a paragraph, to have some text over the image and also to define the size of the section/parent.</p> </section> </body> </html>