Universal Selectors
The universal selector (*) applies styles to all elements on a page.
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}✔ This resets margins and paddings for all elements.
Qus. 1 : Which of the following selector select an element if it's the child of its parent ?
- :root
- :nth-of-type(n)
- :only-child
- none of the mentioned
- Universal Selector (*)
- Tag Selector
- Class Selector
- ID Selector
- Tag > Class > ID
- Class > Tag > ID
- ID > Class > Tag
- Universal > ID > Class