CSS Class Code Challenge

Now that we have style tags to indicate the area which should be read by the browser as CSS, we can begin writing classes inside of them.

As mentioned, a CSS class starts with a . and is followed by a name (it can be whatever you'd like, as long as it starts with an alphabetical character), then a pair of opening and closing curly brackets.

If I were to make a class whose purpose was to turn text blue, I'd start with a name that resembles what effect the class will have on an HTML element—so something like:

.text-blue {

}

Using the same naming convention above where a color is prefixed by "text," declare a class whose purpose is to turn text green (make sure to include your opening and closing curly brackets).

index.html

Providing the lift to launch your development career

© 2024 Chris Courses. All rights reserved.