Contact Us || Privacy Policy || About Us |
|
CSS SelectorsCSS selectors define on the HTML elements according to , id, class, type, attribute etc. There are different types of selectors in CSS that is.
1) Class SelectorClass Selector are used to full stop symbol (.) Selects the elements that have the given class attribute. Syntax:- Example1:-Test it NowOutput: This heading, red Color.This paragraph, blue Color. 2) Id SelectorId Selector are used to hash character (#) symbol . Selects an HTML element based on the value of its id attribute Syntax:- Example2:-Test it NowOutput: This heading, red Color.This paragraph, blue Color. 3) Element SelectorElement selector selects the HTML element by the name. Syntax:- Example3:-Example:-Test it Now4) Universal SelectorUniversal selector are used to a wildcard character (*). It selects all the HTML elements on the pages. Test it NowOutput: HTMLCSS JavaScript PHP 5) Group SelectorGrouping selector is used to select all the HTML elements with the same style. Group Selector are used to Commas, separate each selector in grouping.. Test it NowOutput: Hello HTMLHello CSSBootstrap.
Next TopicHow to USe CSS
|