Assignment - Selectors & Properties
- Style the above
<h1>
tag to use any color of your choice and a sans-serif
font.
- Style all
<code>
tags to use the monospace
font-family and have red text.
- Use a class selector to ensure that the
<code>
elements in the second <li>
element have a different color (e.g. green).
- Switch the order of the rules you created and use the dev tools of your browser to understand how specifity resolves conflicts (for the
<code>
elements).
- Set a default font (e.g. sans-serif) for the entire content of your page and use "Inheritance" to change the font of the
<li>
items, too.
- Use a combinator to give all
<li>
elements but the first one (!) a black background and white text color (don't worry if the numbers disappear).
- Use another combinator to now give all
<li>
inside an <ol>
element a black background and white text color.