Master the language that brings websites to life.
// CSS HISTORY
CSS (Cascading Style Sheets) was first proposed by Håkon Wium Lie in 1994. It separated presentation from structure, revolutionizing web design and enabling the responsive, beautiful websites we see today.
// WHY CSS MATTERS
CSS controls every visual aspect of a website: colors, layouts, typography, animations, and responsiveness. Mastery of CSS transforms a plain HTML document into a stunning, interactive experience.
12 lessons • Style & design
Learn what CSS is and how it styles web pages
BeginnerTarget elements precisely and understand specificity rules
BeginnerMaster color values, lengths, and CSS units
BeginnerUnderstand content, padding, border, and margin
BeginnerStyle text with fonts, sizes, spacing, and alignment
BeginnerControl element positioning and display types
IntermediateCreate flexible one-dimensional layouts with ease
IntermediateBuild complex two-dimensional grid-based layouts
IntermediateMake websites work on all screen sizes
IntermediateAdd motion and interactive effects.
IntermediateOrganize CSS with BEM, SMACSS, methodologies.
AdvancedCSS variables, custom properties, new features.
AdvancedCSS (Cascading Style Sheets) was first proposed by Håkon Wium Lie in 1994. It separated presentation from structure, revolutionizing web design and enabling the responsive, beautiful websites we see today.
CSS controls every visual aspect of a website: colors, layouts, typography, animations, and responsiveness. Mastery of CSS transforms a plain HTML document into a stunning, interactive experience.
From Flexbox to Grid, from transitions to animations, CSS has evolved into a powerful layout language. With modern features like container queries and cascade layers, the future of CSS is brighter than ever.
Style the web. Own your design.
CSS (Cascading Style Sheets) is a stylesheet language used to describe the presentation of a document written in HTML.
1. CSS stands for Cascading _____.
Hint: S-S
2. External CSS uses the _____ tag.
Hint: In head
3. Inline styles use the _____ attribute.
Hint: HTML attr
4. h1 is a _____.
Hint: Targets elements
5. color: blue is a _____.
Hint: Property + value
6. /* */ defines a _____.
Hint: Code note
7. Recommended: external _____.
Hint: Separate file
8. Cascading means styles _____.
Hint: From parent
Specificity determines which rule wins. Higher specificity = higher priority:
1. .class uses _____ selector.
Hint: Dot notation
2. #id uses _____ selector.
Hint: Hash notation
3. ul > li uses _____ combinator.
Hint: Direct child
4. :hover is a _____ class.
Hint: State-based
5. ::before is a _____.
Hint: Creates content
6. ID specificity is _____.
Hint: Highest
7. nth-child(n) selects by _____.
Hint: Number
8. Universal selector is _____.
Hint: Asterisk
1. #f00 is _____ color.
Hint: Short hex
2. rgb(255, 0, 0) is _____.
Hint: Full red
3. % is relative to _____.
Hint: Container
4. rem is relative to _____.
Hint: HTML
5. vw stands for _____.
Hint: Window
6. var() accesses _____.
Hint: Custom props
7. calc() performs _____.
Hint: Math
8. HSL uses hue, _____, lightness.
Hint: Color intensity
Every element in CSS is a rectangular box with: content, padding, border, and margin.
Vertical margins between elements collapse to the larger value.
1. Box model has content, padding, _____, margin.
Hint: Around padding
2. padding is inside the _____.
Hint: Surrounds content
3. margin is _____ the border.
Hint: External space
4. border-box makes width include _____.
Hint: Content + padding + border
5. margin collapses _____.
Hint: Top/bottom
6. border-radius creates _____.
Hint: Curved edges
7. Shorthand: 10px 20px is _____ values.
Hint: TB RL
8. box-sizing default is _____.
Hint: Content only
1. font-family sets the _____.
Hint: Font name
2. line-height controls _____.
Hint: Between lines
3. text-decoration: underline adds a _____.
Hint: Under text
4. text-transform: _____ makes ALL CAPS.
Hint: Capital
5. text-shadow has _____ values.
Hint: x y blur color
6. @font-face is for _____ fonts.
Hint: Your own
7. font-display: swap prevents _____.
Hint: Flash
8. Google Fonts uses _____ tag.
Hint: In head
1. display: none makes element _____.
Hint: No space
2. position: absolute is relative to _____.
Hint: Positioned parent
3. position: fixed is relative to _____.
Hint: Screen
4. z-index controls _____.
Hint: Layer order
5. margin: 0 auto centers _____.
Hint: Block elements
6. flexbox uses justify-content for _____.
Hint: Main axis
7. inline-block can have _____.
Hint: Width/height
8. position: sticky toggles to _____.
Hint: On scroll
1. display: flex enables _____.
Hint: Layout
2. justify-content aligns on _____.
Hint: Horizontal
3. align-items aligns on _____.
Hint: Vertical
4. flex-direction: column stacks _____.
Hint: Top to bottom
5. flex-grow makes items _____.
Hint: Fill space
6. flex-wrap enables _____.
Hint: Multiple lines
7. align-self overrides _____.
Hint: Individual
8. gap creates space between _____.
Hint: Flex items
1. display: grid enables _____.
Hint: Layout
2. 1fr is _____ fraction.
Hint: Unit
3. repeat(3, 1fr) creates _____ columns.
Hint: Three equal
4. grid-column: 1/3 spans _____ columns.
Hint: From 1 to 3
5. grid-area can use _____ names.
Hint: Custom names
6. auto-fit _____ empty columns.
Hint: Folds up
7. minmax(200px, 1fr) has _____ value.
Hint: Smallest
8. gap is shorthand for row-gap and _____.
Hint: Grid gap
1. @media is used for _____.
Hint: Responsive
2. min-width targets _____ screens.
Hint: And above
3. @supports checks for _____.
Hint: CSS support
4. print media is for _____.
Hint: Paper
5. max-width: 100% makes images _____.
Hint: Scale down
6. Mobile-first uses _____ queries.
Hint: Up from
7. sizes attribute tells browser about _____.
Hint: Image size
8. 768px is a common _____ breakpoint.
Hint: Medium size
1. transition animates on _____ change.
Hint: CSS property
2. @keyframes defines _____.
Hint: Keyframes
3. transform: translate moves _____.
Hint: Move element
4. animation-iteration-count: _____ loops forever.
Hint: Non-stop
5. ease is a _____ function.
Hint: Speed curve
6. transform-origin defaults to _____.
Hint: Middle
7. Animate transform for _____.
Hint: Smooth
8. animation-fill-mode: forwards keeps _____ state.
Hint: Final
Block Element Modifier - a naming convention for maintainable CSS.
1. BEM stands for Block _____.
Hint: Methodology
2. __ separates _____.
Hint: From block
3. -- indicates _____.
Hint: Variations
4. :root defines _____ properties.
Hint: CSS variables
5. box-sizing: border-box should be _____.
Hint: All elements
6. normalize.css makes browsers _____.
Hint: Same appearance
7. Utility classes are _____-purpose.
Hint: One job
8. margin: 0 is a _____ utility.
Hint: Layout
Style elements based on their container's size, not viewport.
Check caniuse.com for feature support. Many modern CSS features require recent browser versions.
1. Container queries use the _____ size.
Hint: Parent
2. & in CSS nesting refers to _____.
Hint: Selector
3. subgrid inherits from _____.
Hint: Above
4. color-mix blends _____.
Hint: Two colors
5. animation-timeline: scroll() uses _____.
Hint: Page scroll
6. @layer defines _____.
Hint: Order
7. Modern CSS features need _____ browsers.
Hint: Up to date
8. @container was added in CSS _____.
Hint: Year