Hello everybody
Can anyone tell me please whats the difference between css and css2 and css3??
Do we need to make the file type .css2 in order to use CSS2???

Dani AI

Generated

was on the right track: the numbers are just version/level names, and you always use the .css extension (you do not create .css2 or .css3 files). The ecosystem has changed since 2011, so a short update and practical pointers follow.

CSS history and what it means today: CSS1 (mid-1990s) introduced the basics; CSS2 added more layout and media features; CSS2.1 is the corrected, stable "level 2" recommendation (W3C CSS2.1). What people call "CSS3" is not one single spec but a set of independently-evolving modules (selectors, box model, media queries, flexbox, grid, transforms, transitions, animations, custom properties, etc.). Many of those modules are now stable and implemented across modern browsers — see general docs at MDN Web Docs: CSS.

Practical rules to follow:

  • Always name stylesheet files with .css and link them normally. For example:

    <link rel="stylesheet" href="styles.css">
  • Use feature queries instead of guessing support:

    @supports (display: grid) {
      .layout { display: grid; }
    }
  • Check real browser support before using newer features (use Can I use to verify). Use PostCSS/Autoprefixer to handle vendor prefixes automatically (Autoprefixer) and prefer progressive enhancement with fallbacks or polyfills where needed.

This gives the precise, modern context for 's answer and practical steps to use newer CSS features safely today.

Recommended Answers

All 2 Replies

They are simply the different versions of CSS. Currently CSS2 is the latest officially released version of CSS, and is what should be generally used. CSS3 is the newest version of CSS, but is still being made. Some properties from CSS3 are supported but very few.

No, you would use the .css file extension for all of them.

Regards
Arkinder

Thank you.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.