Intro to CSS

Frontend SELF EN
Level 12 , Lesson 1
Available

1.1 The History of CSS

Cascading Style Sheets (CSS) is one of the key components of web development, responsible for the visual styling of web pages. The history of CSS started in the mid-90s when the need to separate structure and style on web pages became obvious.

Early Internet Days

Back in the early 90s, when the Internet was just gaining popularity, web pages were created using HTML, which defined both structure and styling. Web designers embedded styles directly into the HTML code using attributes of <font> and <center> tags. This led to bulky and hard-to-maintain web pages.

The Birth of CSS

In 1994, Håkon Wium Lie, working at CERN, proposed the concept of CSS. He understood that web pages needed a standardized way of styling that was independent of HTML. Tim Berners-Lee, the inventor of the World Wide Web, supported this idea.

Standardization

In December 1996, the World Wide Web Consortium (W3C) published the first CSS specification, known as CSS1. This was the first step toward separating the structure of a web page from its style. CSS1 included basic styling for text, fonts, color, and alignment, but its capabilities were limited.

Nevertheless, CSS1 laid the groundwork for the future development of web design. It gave developers the ability to control text colors, backgrounds, typography, and element alignment on a web page. This was a big leap forward, although CSS1 had many limitations and shortcomings.

1.2 The Evolution of CSS

CSS2: Expanding Capabilities

In 1998, just two years after the release of CSS1, W3C released the CSS2 specification. It greatly expanded the capabilities of CSS1 by adding new features and improvements like absolute and relative positioning, z-index, media types, and table styling.

CSS2 was an important step forward, providing developers with more tools for creating complex layouts and enhanced style control.

CSS2.1: Fixes and Enhancements

Despite the innovations in CSS2, developers faced implementation and compatibility issues. To address these problems, the CSS2.1 specification was released in 2004. It included bug fixes and improvements, providing a more stable and reliable foundation for web design.

CSS2.1 became the de facto standard that developers could rely on when creating web pages.

CSS3: The Modular Approach

CSS3 was a real breakthrough in web development. Unlike its predecessors, CSS3 was designed as a modular system. This meant that different parts of CSS could evolve independently, speeding up the development and implementation of new features.

CSS3 brought a plethora of new features, such as animations, transitions, gradients, media queries, Flexbox, and Grid Layout. These innovations made it possible to create more complex, interactive, and responsive web pages.

The Modern State of CSS: Living Standard

Modern CSS continues to evolve modularly, allowing it to quickly adapt to changes in web technologies and developer needs. Modules like CSS Grid Layout, CSS Custom Properties (variables), and CSS Houdini provide new possibilities for creating flexible and powerful web designs.

1.3 Core Principles of CSS

CSS is built upon three core principles: cascading, inheritance, and specificity.

  • Cascading: rules are applied in the order they are defined. If multiple rules conflict, the last rule in the code takes precedence.
  • Inheritance: some properties are inherited from parent elements to child elements, for example, text color and font family.
  • Specificity: rules with higher specificity take priority. Specificity is calculated based on selectors.

CSS has come a long way since its creation in 1994. From a simple tool for styling text and backgrounds to a powerful language for creating complex layouts and animations, CSS has become an essential tool in web development.

Its modular structure allows web standards to evolve quickly and adapt to new requirements, making the Internet more beautiful and user-friendly. Understanding the history and evolution of CSS helps to better grasp how and why modern techniques and standards are used in web design.

Comments
TO VIEW ALL COMMENTS OR TO MAKE A COMMENT,
GO TO FULL VERSION