🍋
Menu
.css Code

CSS (Cascading Style Sheets)

CSS is the language that controls the visual presentation of web pages — layout, colors, fonts, spacing, animations, and responsive design. Every website uses CSS alongside HTML, and it is essential for creating modern, accessible, and visually appealing user interfaces.

MIME Type

text/css

Type

Text

Compression

Lossless

Advantages

  • + Separates presentation from content (HTML)
  • + Powerful layout systems: Flexbox, Grid, and container queries
  • + Custom properties enable theming and dynamic values
  • + Media queries enable responsive design for all screen sizes

Disadvantages

  • Global scope can cause unintended style conflicts
  • Browser compatibility differences require testing
  • No native variables before custom properties (pre-2017)

When to Use .CSS

Use CSS for all web page styling, from simple typography to complex layouts and animations.

Technical Details

CSS uses selectors to target HTML elements and declaration blocks to apply styles. The cascade, specificity, and inheritance rules determine which styles take precedence. Modern CSS includes Flexbox, Grid, custom properties (variables), and container queries.

History

Hakon Wium Lie proposed CSS in 1994 at CERN. CSS1 was published in 1996, CSS2 in 1998, and CSS3 introduced modular specifications starting in 1999. Modern CSS features like Grid, Flexbox, and custom properties continue to evolve.

Convert from .CSS

Convert to .CSS

Related Formats

Related Terms

Learn More

Use Cases