Skip to main content

Menu

LEVEL 0
0/5 XP
HomeAboutTopicsPricingMy VaultStats

Categories

πŸ€– Artificial Intelligence
☁️ Cloud and Infrastructure
πŸ’Ύ Data and Databases
πŸ’Ό Professional Skills
🎯 Programming and Development
πŸ”’ Security and Networking
πŸ“š Specialized Topics
HomeAboutTopicsPricingMy VaultStats
LEVEL 0
0/5 XP
GitHub
Β© 2026 CheatGridβ„’. All rights reserved.
Privacy PolicyTerms of UseAboutContact

CSS Cheat Sheet

CSS Cheat Sheet

Back to Web Development
Updated 2026-04-27
Next Topic: CSS Flexbox Layout Cheat Sheet

Cascading Style Sheets (CSS) is the styling language of the web, responsible for controlling the visual presentation of HTML documents. Introduced in 1996 and continuously evolved through modular specifications, CSS enables developers to separate content from presentation, creating responsive, accessible, and visually compelling user interfaces. While HTML provides structure and JavaScript adds interactivity, CSS bridges the gap between raw markup and polished design. The key mental model: CSS is a cascade β€” specificity, inheritance, and source order all matter, and modern CSS now includes native nesting, anchor positioning, scroll-driven animations, and view transitions β€” making understanding the full cascade ecosystem essential for writing maintainable styles.

What This Cheat Sheet Covers

This topic spans 38 focused tables and 341 indexed concepts. Below is a complete table-by-table outline of this topic, spanning foundational concepts through advanced details.

Table 1: Selectors β€” Element, Class, and IDTable 2: Combinator SelectorsTable 3: CSS NestingTable 4: Pseudo-Classes β€” State and PositionTable 5: Pseudo-ElementsTable 6: Box Model PropertiesTable 7: Display and VisibilityTable 8: PositioningTable 9: Logical PropertiesTable 10: Anchor PositioningTable 11: Flexbox Container PropertiesTable 12: Flexbox Item PropertiesTable 13: Grid Container PropertiesTable 14: Grid Item PropertiesTable 15: Typography PropertiesTable 16: Color and BackgroundsTable 17: Color FunctionsTable 18: Borders and OutlinesTable 19: Units of MeasurementTable 20: Overflow and ClippingTable 21: TransformsTable 22: TransitionsTable 23: AnimationsTable 24: Scroll-Driven AnimationsTable 25: View TransitionsTable 26: Filters and Blend ModesTable 27: Media QueriesTable 28: Custom Properties (CSS Variables)Table 29: Container QueriesTable 30: Cascade LayersTable 31: Aspect Ratio and Object SizingTable 32: Scroll BehaviorTable 33: List StylingTable 34: Cursor StylesTable 35: Table StylingTable 36: Form StylingTable 37: Print StylesTable 38: Stacking Context and Z-Index

Table 1: Selectors β€” Element, Class, and ID

SelectorExampleDescription
Class selector
.btn { padding: 10px; }
β€’ Targets elements with a specific class attribute
β€’ reusable across multiple elements.
Type selector
p { color: blue; }
β€’ Targets all elements of a specific HTML tag
β€’ applies broadly across the document.
ID selector
#header { height: 80px; }
β€’ Targets a single unique element with a specific ID
β€’ high specificity, use sparingly.
Universal selector
* { margin: 0; }
β€’ Matches every element in the document
β€’ often used for CSS resets.
Attribute selector
[type="text"] { border: 1px solid; }
Targets elements based on the presence or exact value of an attribute.

More in Web Development

  • CSS Animations and Transitions Cheat Sheet
  • CSS Flexbox Layout Cheat Sheet
  • AngularJS Cheat Sheet
  • Frontend State Management Beyond Redux Cheat Sheet
  • React Frontend Framework Cheat Sheet
  • SvelteKit Meta-Framework Cheat Sheet
View all 43 topics in Web Development