Ajax-loader-large-white
About You
Work Your Body

Great! Now everything is centered on your page. But right now, our styling is awful repetitive, don't you think? How can we apply one style rule to both elements?

One of the best tricks in web design is using a surrounding, parent element. Let's add a style to a single element that surrounds our heading and our paragraph. Fortunately, every HTML page has a <body> element that wraps everything that is visible on the page.

Instructions
  1. On a new line after your <style></style> element, add a <body> tag.
  2. At the very bottom of your page on a new line, add a closing </body> tag.
  3. Then, replace your h1 and your p style selectors with a new body selector. Remember to set the text-align to center for your entire body.
?
Stuck? Get a hint! Hint
Get live, fast support from Codecademy Advisors when you get stuck. Learn more.

First, add the body tags:

...
</style>
<body>
    <h1>Your Name</h1>
    ...
    <input type="submit>
</body>

Then, set your styling to the following:

<style>
    body {
        text-align: center;
    }
</style>
index.html
project
View Preview