Unit 2 ยท This Is Me In Tech
Stage 2 of 7
Unit 2 ยท Stage 2
Your page has a body style now. Next you will style the header at the top: the big title and your name line. This is the first thing anyone sees, so let us make it stand out. (pause on a highlighted word to see what it does)
In your HTML, the <header> tag groups the top of the page: the title and your name. To style it, you write a rule with the selector header, just like you wrote one for body.
Two properties give the header its look: a background color, and padding to keep the text from crowding the edges.
background-color#50586C is a deep slate gray.padding20px gives the title room to breathe so it does not touch the sides.header rule right under the body rule, inside your <style>. Not sure how it should look? Use the example below, then press โถ Run.header {
background-color: #50586C;
padding: 20px;
}
What CSS property changes how big your text is? Type it, then press Submit to unlock the next steps.
Your <h1> is the main title. Style it so it is large, light-colored against the dark header, and bold.
font-size50px makes a strong, readable title.color#f9f7f8 is almost white, so it stands out on the dark header.font-weightbold makes the letters thick and heavy.h1 rule right under your header rule. Use the example below if you need it, then press โถ Run.h1 {
font-size: 50px;
color: #f9f7f8;
font-weight: bold;
}
The <h4> under the title holds your name. Give it a color and a smaller size so it sits nicely under the big title.
#ec65f8 is a bright pink. Swap it for a color from your Tribal Nation's flag or regalia. Try #2D5016 (forest green) or #C8A24B (gold).h4 rule, then change the color to one that feels like you. Use the example below to start, then press โถ Run.h4 {
color: #ec65f8;
font-size: 18px;
}
To complete Stage 2, your header needs a background color and your h1 needs a large font size. Press Check my work when you are ready. This opens Stage 3 and lets your teacher see that you finished.