<!doctype html>
<html>
<head>
<title>Color</title>
<link href="style.css" rel="stylesheet">
</head>
<body>
<ol>
<li>This paragraph will be <em>dodgerblue</em>.</li>
<li>Which can also be written as <em>#1e90ff</em>.</li>
<li>Or as <em>rgb(30, 144, 255)</em>.</li>
<li>And as <em>hsl(210, 100%, 56%)</em>.</li>
<li>This has an <em>alpha</em> (transparency) value in the color.</li>
<li>Same for this one.</li>
<li>This uses a separate <em>opacity</em> property.</li>
<li>All of these work for backgrounds, too!</li>
</ol>
</body>
</html>
li:nth-child(1) { color: dodgerblue; }
li:nth-child(2) { color: #1e90ff; }
li:nth-child(3) { color: rgb(30, 144, 255); }
li:nth-child(4) { color: hsl(210, 100%, 56%); }
li:nth-child(5) { color: rgba(30, 144, 255, 50%); }
li:nth-child(6) { color: hsla(210, 100%, 56%, 0.5); }
li:nth-child(7) {
color: dodgerblue;
opacity: 0.5;
}
li:nth-child(8) {
color: white;
background-color: dodgerblue;
}
li + li { margin-top: 1em }