type

Type Selector

Selects all HTML elements matching the given tag name. It is the most basic selector and has the lowest specificity among named selectors.

element

Example

p { color: navy; } /* HTML: <p>Hello world</p> */

✓ Matches

  • <p>Hi</p>
  • <p class="intro">Intro</p>
  • <p id="lead">Lead</p>

✗ Does not match

  • <div>Hi</div>
  • <span>Text</span>

Browser support

Universal support in all browsers since CSS1.

Related selectors

← All CSS selectors · CSS selectors cheat sheet