.centered-text {
text-align: center;
}
.blue-text {
color: blue;
}
As you can see, we simply define our style once in our CSS and we can reuse the associated class wherever we feel appropriate across our page.
Remember, on top of this, you can also combine ids and classes to apply individual styles as well as global styles. This can be useful in situations where you want to make a tweak to a single element that is making use of a class.
Sometimes we need to apply the same style to multiple elements, instead of doing this three separate times, like so: