This week, we'll be exploring objects by creating an application to help maintain a record collection. We will be creating objects using object literal
syntax.
- objects
- HTML & CSS
Time to make our index.html page look cool!
Add all CSS through a Stylesheet. Do not use inline styles.
Update the HTML:
- Place the existing
h1
inside aheader
element. - Add an
h2
element into theheader
that saysYOUR NAME's Record Shop
. - Place the existing
p
inside amain
element.
Add a Stylesheet:
- Create a
stylesheet.css
file and source it into the HTML file. - Give the
header
a dark background color and choose a light color for the text. - Center the text in the
header
. - Give the
main
a light grey background color. - Look up the CSS
background-image
property to learn how to use the providedrecord.png
as the background image on your page with a relative path. - Look up CSS
background-repeat
to learn how to fill the body of the page with a repeating image. - Look up CSS
margin
andpadding
.- Give the
body
a margin of0
. (This removes the whitespace around the edges of the page.) - Give the
main
padding of1em
. (Curious aboutem
? Look up CSS units.)
- Give the
Here's an example of what the style could look like:
STRETCH GOAL: Use CSS style classes vs element names to do your styling, except for adding the margin to the body
. That is a good thing to add to every CSS file, and it should use the body
HTML tag name.
Check in your repo, then turn in your work via the Prime Academy Assignment Application at http://primeacademy.io, as usual and don't hesitate to hit up the Slack channel as needed!