Web >> Design >> CSS >> What is the CSS SyntaxCSS SyntaxSelector { property:value; property:value}
Selector - Basic
Example of element selector p { text-align: center; Example of id selector: #para1 { text-align: center; Example of class selector .center { Selector - Combinations Example of element + class selector. e.g. <p> element with class="center" p.center { text-align: center; Example of element + id selector. e.g. <p> element with id="centered" p#centered { text-align: center; Example of class + element + id selector. e.g. <p> element with id="centered" whose parent has class="center" .center p#centered { text-align: center;
How to insert comments use /* comment */ to put some comment e.g. h1 { }
References https://www.w3schools.com/cssref/css_selectors.asp
|