CSSSS
CSSSS
g
attributes, ids, and classes] to which a set of styling rules apply. It is usually
at the beginning of the ruleset. For instance, in the illustration above, the
<body> element is the selector. To style a different element you simply have to
change the selector. Other forms of selectors in CSS include;
a universal selector - denoted by the symbol * and which affects all elements (e.g
heading, paragraph, list, etc.) on a document tree or all values of a particular
element.
Values: are written after the colon that separates them from the properties in CSS.
The word values can be quite misleading though because CSS values are not just
text; they are often in different forms like integers, units, strings, URLs, etc.
See below for more details 👇
text values - are quite common in CSS and are usually written without quotes.
italic and blue are the text values of font-style and color in the CSS ruleset
above.
integers - are numbers from zero to nine. Some CSS properties allow their values to
be described as negative integers. An example of an integer is "6" as a value for
the property column-count. It isn't uncommon to see some properties like margin
take on two values (e.g. 3 auto;). When this occurs, the first value (3 in this
case) affects the element's top and bottom side while the second value affects the
left and right side [note that 'auto' is a special value that divides the available
horizontal space evenly between left and right].
URLs - properties like background-image often take an actual URL as their value. A
URL could be absolute or relative meaning that the address of an image could either
be copied online and used as a background image or an image could be uploaded
directly from the user's computer. For example: div{background-image:
url("./images/picture.jpg");}
a universal selector - denoted by the symbol * and which affects all elements (e.g
heading, paragraph, list, etc.) on a document tree or all values of a particular
element.
a universal selector - denoted by the symbol * and which affects all elements (e.g
heading, paragraph, list, etc.) on a document tree or all values of a particular
element.
Values: are written after the colon that separates them from the properties in CSS.
The word values can be quite misleading though because CSS values are not just
text; they are often in different forms like integers, units, strings, URLs, etc.
See below for more details 👇
text values - are quite common in CSS and are usually written without quotes.
italic and blue are the text values of font-style and color in the CSS ruleset
above.
integers - are numbers from zero to nine. Some CSS properties allow their values to
be described as negative integers. An example of an integer is "6" as a value for
the property column-count. It isn't uncommon to see some properties like margin
take on two values (e.g. 3 auto;). When this occurs, the first value (3 in this
case) affects the element's top and bottom side while the second value affects the
left and right side [note that 'auto' is a special value that divides the available
horizontal space evenly between left and right].
URLs - properties like background-image often take an actual URL as their value. A
URL could be absolute or relative meaning that the address of an image could either
be copied online and used as a background image or an image could be uploaded
directly from the user's computer. For example: div{background-image:
url("./images/picture.jpg");}
Values: are written after the colon that separates them from the properties in CSS.
The word values can be quite misleading though because CSS values are not just
text; they are often in different forms like integers, units, strings, URLs, etc.
See below for more details 👇
text values - are quite common in CSS and are usually written without quotes.
italic and blue are the text values of font-style and color in the CSS ruleset
above.
integers - are numbers from zero to nine. Some CSS properties allow their values to
be described as negative integers. An example of an integer is "6" as a value for
the property column-count. It isn't uncommon to see some properties like margin
take on two values (e.g. 3 auto;). When this occurs, the first value (3 in this
case) affects the element's top and bottom side while the second value affects the
left and right side [note that 'auto' is a special value that divides the available
horizontal space evenly between left and right].
URLs - properties like background-image often take an actual URL as their value. A
URL could be absolute or relative meaning that the address of an image could either
be copied online and used as a background image or an image could be uploaded
directly from the user's computer. For example: div{background-image:
url("./images/picture.jpg");}