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

CSS element type selector

CSS element type selector Bad Practice
CSS element type selector Best Practice

Element type selectors target elements by their specific type. To use this selector, type the element's name without any extra CSS syntax. For example, to apply a style with black text aligned to the left to all <h1> headings of the page:

h1 {

text-align: left;

color: black;

}

This style will only apply to <h1> elements and won't affect other headings and body text.

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