You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

34 lines
1.5 KiB

2 years ago
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>CSS Course</title>
<link rel="stylesheet" href="main.css">
</head>
<body>
<h1 id="assignment-instructions">Assignment - Selectors &amp; Properties</h1>
<ol>
<li>Style the above <code>&lt;h1&gt;</code> tag to use any color of your choice and a <code>sans-serif</code> font.</li>
<li>Style all <code>&lt;code&gt;</code> tags to use the <code>monospace</code> font-family and have red text.</li>
<li>Use a class selector to ensure that the <code>&lt;code&gt;</code> elements in the second <code>&lt;li&gt;</code> element have a different color (e.g. green).</li>
<li>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>&lt;code&gt;</code> elements).</li>
<li>Set a default font (e.g. sans-serif) for the entire content of your page and use "Inheritance" to change the font of the <code>&lt;li&gt;</code> items, too.</li>
<li>Use a combinator to give all <code>&lt;li&gt;</code> elements but the first one (!) a black background and white text color (don't worry if the numbers disappear).</li>
<li>Use another combinator to now give all <code>&lt;li&gt;</code> inside an <code>&lt;ol&gt;</code> element a black background and white text color.</li>
</ol>
</body>
</html>