A Brief Introduction to CSS Syntax
Each statement, or rule, in CSS has three main elements: a selector, a property and a value. See below:
(1) The selector designates the html element of a page or website you wish to stylize—for instance, the html element #footer, designating the footer on Scalar pages.
(2) The property designates the style attribute of the selector you wish to stylize—for instance, the background color of the element #footer.
(3) The value specifies the style attribute of the selector you wish to style—for instance, the color red for the background of the element #footer.
Finally, the property and value are separated by a colon, terminated by a semi-colon and bounded by brackets.
Read more about CSS syntax here.
(1) | (2) | (3) |
#footer | {background-color: | red;} |
selector | property | value |
(2) The property designates the style attribute of the selector you wish to stylize—for instance, the background color of the element #footer.
(3) The value specifies the style attribute of the selector you wish to style—for instance, the color red for the background of the element #footer.
Finally, the property and value are separated by a colon, terminated by a semi-colon and bounded by brackets.
Read more about CSS syntax here.
Previous page on path | Custom Styling, page 1 of 10 | Next page on path |
Discussion of "A Brief Introduction to CSS Syntax"
Add your voice to this discussion.
Checking your signed in status ...