CSS glossary: Novice level

51 CSS terms at the Novice level, each with a short definition and a link to its full page.

Updated

Study these as flash cards

Adjacent sibling combinator
The + between selectors: matches the element right after another.
Background color
Fills an element's background with a color.
Block
An element that starts on a new line and takes the full width.
Border
Draws a line around an element: width, style, color.
Box model
Every element is a box: content, padding, border, margin.
Browser default styles
Styles the browser adds before yours, like blue links and heading sizes.
Cascade
How CSS decides which rule wins when rules disagree.
Child combinator
The > between selectors: matches direct children only.
Class selector
Starts with a dot and selects elements with that class.
Color
The color property sets text color; colors can be names, hex or rgb().
Comment
A note between /* and */ that is ignored by CSS.
Content box
The innermost part of an element, where the content goes.
CSS
The language that controls how a web page looks: colors, fonts, spacing, layout.
CSS Rule
A CSS Rule defines the style that you want to apply to an element once you have targeted…
Declaration
One styling instruction: property: value;
Declaration block
Everything between a rule's curly braces.
Descendant combinator
A space between selectors: matches elements anywhere inside another.
em unit
A size equal to the element's font size.
External stylesheet
A separate .css file that pages load with a <link> tag.
Font family
Picks the typeface, with fallbacks.
Font size
Sets how big the text is.
Font weight
Sets how thick the text is, like bold or 700.
General sibling combinator
The ~ between selectors: matches every later sibling.
Height
Sets how tall an element is.
Hex color
A color written as # plus six digits for red, green and blue.
ID selector
Starts with # and selects the one element with that id.
Inheritance
Some properties, like color and font, pass down from parent to children.
Inline
An element that sits within a line of text, only as wide as its content.
Inline style
CSS written on one element with the style attribute.
Internal stylesheet
CSS inside a <style> tag that styles only that page.
Kebab Case
All letters are lower case. Each word is separated by an dash.
Link element
This loads an external stylesheet.
Margin
Space outside an element's border that pushes neighbors away.
Named color
A color CSS knows by name, like teal or tomato.
Padding
Space inside an element, between its content and border.
Percentage
A size worked out from the parent, so it grows and shrinks with it.
Pixel
px: a fixed unit of size on screen.
Property
The thing you want to change, like color or width.
rem unit
A size equal to the root (html) font size, usually 16px.
RGB color
A color mixed from red, green and blue, 0-255 each.
Selector
A CSS Selector allows you to identify (target) one or more elements in the DOM to apply…
Selector list
Several selectors separated by commas, sharing one set of styles.
Snake Case
All letters are lower case, each word is separated by an underscore.
Source order
When two rules are equally strong, the later one wins.
Specificity
How precise a selector is; the more specific rule wins.
Stylesheet
A file or block of CSS rules that styles one or many pages.
Text alignment
Lines text up left, right or center.
Type selector
Selects every element with a given tag name, like p or img.
Universal selector
The * selector: matches every element.
Value
What you set a property to, like red or 16px.
Width
Sets how wide an element is.

Every CSS term, by level