Finally, it's time to apply our CSS class to an actual HTML element.
One of the attributes you can use on an HTML element is class=""
—it simply determines what classes should have their properties applied. An example of a class attribute taking the previous class of .text-blue
would look like so:
<h1 class="text-blue">Christopher Lis' Portfolio Site</h1>
This would simply turn the text "Christopher Lis' Portfolio Site," blue.
I've inserted an h1 tag below for your own website. Add a class attribute to it and apply your class of .text-green
(note, the preceding .
is not used when applying your class to an HTML class attribute).