CSS Flashcards
(42 cards)
What does CSS stand for?
Cascading Style Sheets
What is the purpose of CSS?
It alters and styles the appearance of a webpage. For example, it changes font, text color, size, spacing, etc.
What are the parts of the CSS syntax rule?
- Selector
- Declaration
- Property
- Value
What is the selector in a syntax?
The selector is the HTML element that is being styled.
What is the declaration in a syntax?
The declaration is a pair of property and value, separated by a colon. It is closed with a semicolon at the end.
What is a declaration block?
It is a structure that begins with an opening brace ( { ) and ends with a closing one ( } ).
What is the property in a syntax?
The specific aspect or characteristic of the selector that is being modified.
What is the value in a declaration?
The setting for the property, such as blue as color, 30px as font-size, or 2px solid black as border.
How can you type a comment in CSS?
By using this text: /*(insert text here)*/
How are colors specified?
With predefined color names (red, yellow, sky blue) or RGB, HEX, HSL, RGBA, and HSLA values.
Which property sets the background color of an element?
background-color
Which property sets the color of a text?
color
What does RGB stand for?
Red Green Blue
How does RGB function?
Each parameter is set from 0 to 255 (0 being the lowest intensity and 255 being the highest). The more intense a color is, the more it will be visible.
How can you make shades of grey with RGB?
By aligning the parameters to be equal.
Ex: rgb(60, 60, 60)
What does the A mean in RGBA and what is its function?
Alpha.
The function of alpha is to adjust the opacity of a color from the value of 0-1. 0 is fully transparent, and 1 is not transparent at all.
What is a HEX color?
A HEX, or hexadecimal color, is specified with #RRGGBB. The RR is red, the GG is green, and the BB is blue. They describe the components of a color.
How are HEX colors measured?
The values are between 00 and ff, which is equivalent to 0 and 255 in RGB.
Ex: #ff0000 is red because red is the highest value.
How can you make shades of grey with HEX?
Use equal values for all three light sources.
Example: 3c3c3c, f9f9f9
What does HSL stand for?
Hue Saturation Lightness
I donβt really care about HSL so Iβm not gonna bother to elaborate further
Okay π
Which property states the opacity of an element?
opacity
Tip: The value spans from 0.0 to 1.0. The lower the value, the more transparent.
Which property specifies an image to use as a background?
background-image
Which value is used to input an image as a background for the background-image property?
url(ββ¦β)