CSS Selectors, Properties and Declarations Flashcards
What is a CSS selector
A HTML tag you want to affect using CSS
How does CSS a selector appear
A HTML tag without brackets
What do CSS properties do
Alter specific attributes of a selector
What is a declaration for a CSS selector
Specifying values for CSS properties
What are the CSS declaration and selector together referred to as
A set of rules or ruleset
In a typical CSS ruleset, what is the declaration enclosed in
Curly braces after the selector
What separates the CSS property and declaration
A colon
CSS Property: text-align
Indicate whether to centre the material or align it to the left or right
CSS Property: font-size
Sets the size of text
What is a CSS rule made up of
A selector and a semicolon-separated list of declarations inside brackets
What does each CSS declaration have
A property and a value separated by a colon
What are CSS type selectors
Selectors that match elements by their node name
What is a CSS declaration
The set of visual effects to be applied to a selector
What are CSS id selectors
Selectors that match elements based on their id attribute
What does a CSS id selector consist of
a hash character followed by the id
Where are CSS id selectors normally used
to pick out particular landmarks on a page
What are CSS class selectors
Selectors that match elements based on their class attribute
What does a CSS class selector consist of
a full stop (.) followed by the class name
What is the main benefit of a CSS class selector over an id selector
Multiple element can have the same class
What are CSS combinators
Selectors that allow more than one selector to be combined into a more complex rule
What do CSS descendant combinators consist of
A space between two selectors
What are CSS descendant combinators
Selectors that matches all elements that are descendants of a specified element
What do CSS child combinators consist of
A greater than bracket between two selectors