diff --git a/curriculum/challenges/english/blocks/lecture-css-specificity-the-cascade-algorithm-and-inheritance/672b8e7eca8a4322306d15f8.md b/curriculum/challenges/english/blocks/lecture-css-specificity-the-cascade-algorithm-and-inheritance/672b8e7eca8a4322306d15f8.md index bfd3131b162..887cdbda760 100644 --- a/curriculum/challenges/english/blocks/lecture-css-specificity-the-cascade-algorithm-and-inheritance/672b8e7eca8a4322306d15f8.md +++ b/curriculum/challenges/english/blocks/lecture-css-specificity-the-cascade-algorithm-and-inheritance/672b8e7eca8a4322306d15f8.md @@ -5,7 +5,7 @@ challengeType: 19 dashedName: what-is-the-universal-selector --- -# --description-- +# --interactive-- The universal selector (`*`) is a special type of CSS selector that matches any element in the document. @@ -15,6 +15,15 @@ The universal selector can be used to select all elements within a specific cont Here is an example of using the universal selector for setting the `margin` and `padding` for the entire HTML document: +:::interactive_editor + +```html + + +

Heading element

+

example paragraph element

+``` + ```css * { margin: 0; @@ -22,6 +31,8 @@ Here is an example of using the universal selector for setting the `margin` and } ``` +::: + In this code example, the `*` selector resets the margin and padding of all elements to zero, which is a common technique used in CSS resets. The universal selector has the lowest specificity value of any selector. It contributes 0 to all parts of the specificity value `(0, 0, 0, 0)`. @@ -30,6 +41,8 @@ This means that any other selector, including type selectors, class selectors, I Let's take a look at the following HTML and CSS example: +:::interactive_editor + ```html