β Detailed Guide On Css Selectors π
code example's included for better understanding πππ π
We will explore in-depth detailed guide on css selectors, so yeah π stick around till the end of the Articleπ
So, what does selector means ? Ans: Like to select something ?
Yeah and that's what CSS + Selector i.e. combined CSS SELECTOR does π
CSS selectors are used to select the content you want to style. Selectors are the part of CSS rule set. CSS selectors select HTML elements according to its id, class, type, attribute etc.
So do we have different types of selectors ? π€
Ans: Yeah, there are several different types of selectors in CSS. Lets explore them π
-
CSS Element Selector β
The element selector selects the HTML element by name.
CSS Id Selector β
The id selector selects the id attribute of an HTML element to select a specific element. An id is always unique within the page so it is chosen to select a single, unique element.
It is written with the hash character (#), followed by the id of the element.
CSS Class Selector β
The class selector selects HTML elements with a specific class attribute. It is used with a period character . (full stop symbol) followed by the class name.
CSS Universal Selector β
The universal selector is used as a wildcard character. It selects all the elements on the pages.
CSS Group Selector β
The grouping selector is used to select all the elements with the same style definitions.
Grouping selector is used to minimize the code. Commas are used to separate each selector in grouping.
And that's the gist of this CSS SELECTOR! Thanks for reading this article. I hope it was helpful for CSS beginners. Please feel free to ask questions in the comments below. Ultimately, practicing and building projects and exploring more while believing, Learning and innovation go hand in hand. The arrogance of success is to think that what you did yesterday will be sufficient for tomorrow. Keep learning keep exploring πππ