<?xml version="1.0" encoding="utf-8"?>

Class selector syntax

Class selector syntax

To define any class in the <style> tag, type its value preceded by a period (.). For example, to set the blue color for all elements of the class price, we should apply the following rule:

.price {

color:blue;

}

This rule will only affect elements with the attribute class=" price", while other elements will remain unchanged.

Improve your UX & Product skills with interactive courses that actually work