Visit Mozilla.org

CSS:Type selectors

From MDC

« CSS « CSS Reference

[edit] Summary

CSS type selectors match an element based on the element's node name.

[edit] Syntax

nodeName { style properties }


[edit] Examples

span {
  background-color: DodgerBlue;
}

...where...

  <span>Here's a span with some text.</span>
  <p>Here's a p with some text.</p>

... should look like ...

Here's a span with some text.

Here's a p with some text.

[edit] Notes