/* background-color changes the color of an element's background. */
background-color: black;
}
h1{
/* color changes the color of the text in an element. */
color: red;
}
h2{
color: cyan;
}
p{
color: blue;
}
li{
color: green;
}
a{
color: yellow;
}
button{
color: magenta;
}
footer{
color: white;
background-color: gray;
}
/* you can also style more than one element like this:
element_1, element_2, element_3, ...{
insert_code_here
} */
/* ...but, let's keep it simple for now. */
</style>
...and this into your HTML file!
<body>
<!-- A CSS element is represented by these attribute tags. -->
<!-- An tag looks like this: <body></body> -->
<!-- See how it appears twice? The first part is called the "opening tag", and the second is called the "closing tag". -->
<h1>This is a Heading</h1>
<p>This is a normal paragraph.</p>
<b><p>This is a bold paragraph.</p></b>
<em><p>This is an italicized paragraph.</p><</em>
<u><p>This is an underlined paragraph.</p></u>
<b><em><u><p>And THIS is a paragraph that has been emboldened, italicized AND underlined! How exhilerating!</p></u></em></b>
This, however, is a normal sentence. (Pretty boring, right?)
<ul>
<li>This is a list</li>
<li>This is a list item</li>
<li>Another list item</li>
<li>>Yet another list item</li>
</ul>
<ol>
<h2>This is an ordered list.</h2>
<li>item 1</li>
<li>item 2</li>
<li>item 3</li>
</ol>