Learn CSS - Visual Rules Cheatsheet - Codecademy
Learn CSS - Visual Rules Cheatsheet - Codecademy
Visual Rules
CSS declarations
/* CSS declarations */
text-align: center;
color: purple;
width: 100px;
Font Size
The font-size CSS property is used to set text sizes. font-size: 30px;
Font size values can be many different units or types
such as pixels.
Background Color
!important Rule
https://www.codecademy.com/learn/learn-css/modules/learn-css-selectors-visual-rules/cheatsheet 1/3
12/26/23, 11:00 AM Learn CSS: Visual Rules Cheatsheet | Codecademy
Opacity
The opacity CSS property can be used to control the opacity: 0.5;
transparency of an element. The value of this property
ranges from 0 (transparent) to 1 (opaque).
Font Weight
The font-weight CSS property can be used to set the font-weight: bold;
weight (boldness) of text. The provided value can be a
keyword such as bold or normal .
Text Align
The text-align CSS property can be used to set the text-align: right;
text alignment of inline contents. This property can be
set to these values: left , right , or center .
https://www.codecademy.com/learn/learn-css/modules/learn-css-selectors-visual-rules/cheatsheet 2/3
12/26/23, 11:00 AM Learn CSS: Visual Rules Cheatsheet | Codecademy
Resource URLs
Background Image
Font Family
li {
color: khaki;
}
Print Share
https://www.codecademy.com/learn/learn-css/modules/learn-css-selectors-visual-rules/cheatsheet 3/3