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

CSS declaration block

CSS declaration block Bad Practice
CSS declaration block Best Practice

The declaration block defines one or more properties of the selector element, and the number of declarations depends on how many properties you want to define. Each declaration includes the CSS property name and a value — the same as when using inline CSS.

For example, the following CSS rule has two declarations: one that sets the text color of paragraphs <p> to lavender, and the other that sets its font size to 12px:

p {

color: Lavender;

font-size: 12px;

}

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