Essential CSS
JavaScript Roadmap
Learn JavaScript
Mastering Web Typography
Practical Astro
Understanding Async JS
Unorthodox Tailwind
API Masterclass
Build and Deploy
The Beginner Freelancer
Real World Node
Profile Billing Logout
Essential CSS
Lesson Plan
  1. Introduction
    1. Welcome to Essential CSS
    2. Getting started with the course
    3. What are file formats?
    4. Web standards
    5. What is HTML?
    6. What is CSS?
    7. Devtools, your indispensable best friend
  2. CSS Key Concepts
    1. Some background about CSS
    2. CSS Syntax and Terminology
    3. Selectors
    4. Cascade and Specificity
    5. Origin and Importance
    6. Inheritance
    7. How browsers handle CSS
  3. Basic Mental Model
    1. Everything on the web is a box
    2. The box model
    3. How big is your box?
    4. The relationship between px and em
    5. The `box-sizing` property
    6. The `display` property
    7. Formatting contexts
    8. Block boxes
    9. Inline boxes
    10. What is inline-block?
  4. Flexbox and Grid
    1. The parent-child relationship
    2. Sizing in Flexbox
    3. Flex directions
    4. Basic grid concepts
    5. Setting up a grid
    6. Placing grid items
    7. Box alignment
  5. Building web layouts
    1. Arranging your boxes on the web
    2. Positioning schemes
    3. Floating boxes
  6. Typography
    1. Making your text look good
    2. What is a font?
    3. Typesetting with CSS

Some background about CSS

2m:22s

When Sir Tim Berners’ Lee first proposed his idea for a hypertext markup language (HTML), his focus was solely on the organisation and linking of textual information. That is to say, how the content looked was not a priority at the time. The first web page consisted solely of text and links. So there were definitely missing features that authors of web pages were asking for.

The web during the 1990s was pretty much like the wild west, and the early browser vendors were a key reason for that. Mosaic was released by NCSA in 1993, and Marc Andreessen, who led that development team, left for Netscape Communications to work on Netscape Navigator, which proved to be a big hit. Microsoft, who was also eyeing a piece of the Dotcom pie, licensed Mosaic and used it as the basis for Internet Explorer.

Both vendors started to compete with one another in terms of features, and it was common to see websites with badges that stated “best viewed in Netscape” or “best viewed in Internet Explorer”, because code for one browser did not work exactly the same way in another.

It wasn’t until December 1996 when the first CSS standards (CSS Level 1) were published as an official W3C recommendation. At the time, it was fairly rudimentary, allowing authors to control their fonts, colours and spacing between elements on their pages. It also introduced some basic concepts like the box model, style inheritance and the cascade, which remain relevant to this day and are key to understanding how things work.

The thing about web technologies is that they are designed to be backwards compatible, which means that the code written back in 1996 will work the same way when viewed today (although the same cannot be said for code written today when viewed in browsers of yesteryears past). Which is why, if you scour the web for resources, it is a good idea to check the date when the content was written. Because the solutions you find will most likely work for the issue you’re facing, but it may not be today’s best practice any longer.

Modern browsers also push out newer and better features (as well as bug fixes) fairly frequently these days, which means that new techniques are being developed much faster than before. This may be a bit of a challenge as some folks find such a pace intimidatingly frantic, but you can also see it as a very good thing. Because you might find that something that seemed impossible (or extremely hard) to implement a couple months ago is now possible with much less code.

During the twentieth anniversary of CSS in 2016, the W3C published a brief history of CSS until 2016. It is quite a fun read and helps paint a picture of how CSS got to where it is today.