Type (node name)
About
The type selector matches elements based on their type.
div elements
The selector div
matches all div
elements in the DOM.
one
two
three
Paragraph elements
Elements with a different node name are not matched.
- Change the selector to match paragraph elements
Paragraph
Headings
Each heading level, from h1
to h6
, is a different node name. You can match multiple levels by using the comma ,
to separate multiple selectors (see selector list).
- Change the selector to match heading 1
- Change the selector to match all three headings