Use a CSS Class to Style an Element
Summary
- Classes are reusable styles that can be added to HTML elements.
- You can apply a class to an HTML element like this:
<h2 class="blue-text">CatPhotoApp</h2>
. - In CSS style elements, class names start with a period.
- In the HTML element’s class attribute, the class name does not include a period.
Final Code