CSS Flashcards
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.