CSS syntax and selectors
A CSS rule set consists of a selector and a declaration block, as follows:
- The selector points to the HTML element that will be styled.
The declaration block contains one or more declarations separated by semicolons.
Each declaration includes a CSS property name and a value separated by a colon.
A CSS declaration always ends with a semicolon, and declaration blocks are surrounded by curly braces.
CSS selectors are used to find (or select) HTML elements based on their element name, ID, class, attribute, and more.
For more information on using CSS syntax, refer to the W3Schools website:
A typo or incorrect selector. For example, the word "colour" does not work; instead, use "color".
Missing semi-colon at the end of a declaration.
Missing curly braces at the beginning or end of the declaration block.
Missing colon between the property and its value.
Adding a comment to the file using the /* but not closing the comment with */.