Remember our friend <div>, and how we used it to make those multi-colored blocks? Time for you to build your own blocks! (Well, block. Let's not get ahead of ourselves.)
There are three properties you'll need to set values for:
background-color, which you set to a color or hex valueheight, which you set to a value in pixelswidth, which is also measured in pixels
These exercises will give you a brief overview of the different HTML elements you can select and what some of their property-value pairs are (like the new ones we mention above). We'll cover HTML element selection more in the next course!
In the stylesheet.css tab:
- Set the
background-colorto#cc0000, like this:background-color: #cc0000; - Set the
heightto100px, like this:height: 100px; - Set the
widthto100px, as well.
Make sure you're using background-color for your <div>, not color!