CSS element Selector
- Forrige side element
- Næste side #id
- Gå tilbage til forrige niveau CSS vælger referencer
Definition and usage
CSS element
Selectors are used to select all elements with a specified element name.
When using @namespace
When, this selector can be namespace qualified.
- ns|p - Select <p> elements in namespace ns
- *|p - Select all <p> elements
- |p - Select all <p> elements that have not declared any namespace
Example
Select and set the style for all <h1> elements, and select and set the style for all <p> elements:
h1 { border: 2px solid green; background-color: beige; } p { background-color: yellow; }
CSS syntax
element { css declarations; }
CSS syntax with namespace
namespace|element { css declarations; }
Technical details
Version: | CSS1 |
---|
Browser supports
Chrome | Edge | Firefox | Safari | Opera |
---|---|---|---|---|
Støtte | Støtte | Støtte | Støtte | Støtte |
- Forrige side element
- Næste side #id
- Gå tilbage til forrige niveau CSS vælger referencer