selector
type — CSS reference
Targets elements by their type (including namespace where relevant). In HTML, tag names are ASCII case-insensitive; do not assume this for XML.
Formal Syntax & Structure
css syntaxcss
element-nameWorking Example
Example Snippetcss
<!doctype html><html lang="en"><head><meta charset="utf-8"><title>Selector lab</title><style>:where(.sample) { color: rgb(32, 32, 32); }p { color: rgb(0, 96, 80); }</style></head><body><p id="a" class="sample">A</p><div id="b" class="sample">B</div></body></html>