
Muhammad Hamid RazaThe internet used to look like a typewriter exploded inside a filing cabinet. No joke. Before CSS...
The internet used to look like a typewriter exploded inside a filing cabinet.
No joke. Before CSS came along, webpages were basically raw, unstyled walls of text stacked on top of each other. There were no layouts, no colors, no rounded buttons, no elegant fonts. Just content, dumped onto a screen, hoping for the best.
If you've only ever known the modern web — with its gradients, animations, hover effects, and responsive grids — you might never believe what developers had to deal with before 1996.
So here's a question worth asking: what exactly did the web look like before CSS, and how did one technology completely reshape the way we build things?
Let's go back in time. 🕰️
To understand what CSS solved, you first need to picture what the web looked like without it.
The very first webpage ever published went live on August 6, 1991, created by Tim Berners-Lee at CERN. It was pure text. No images. No colors. No layout. Just a page that explained what the World Wide Web project was, written in plain HTML.
That was the web. And for a while, that was fine. The web was designed for scientists to share documents, not for designers to build beautiful experiences.
Here's what early webpages had going on:
It wasn't ugly on purpose. It just wasn't designed at all. The web was a document-sharing tool, not a design canvas.
As the web grew through the early 1990s, developers started wanting to make pages look better. More readable. More structured. More visually appealing.
And this is where things got weird. Because without CSS, the only way to control how something looked was to hack it with HTML itself.
Developers started stuffing visual formatting directly into HTML tags. Things like:
<font face="Arial" size="4" color="red">Hello World</font>
<body bgcolor="#000000" text="#ffffff">
<table width="100%" cellpadding="10" cellspacing="0" border="0">
Every visual change — font size, color, spacing, layout — was baked directly into the HTML markup. There was zero separation between the content and the design.
Want to change the font color across 50 pages? Good luck. You'd open every single file and manually edit every single <font> tag. 😅
Tables were used for everything. The entire page layout was built using invisible HTML tables. Rows and columns of <td> elements held everything together. It worked, barely. But it was fragile, messy, and nearly impossible to maintain.
This is the actual pain that CSS was born to solve.
In October 1994, a Norwegian developer named Håkon Wium Lie proposed the idea of "Cascading HTML Style Sheets" while working at CERN. Around the same time, Bert Bos was working on a similar idea.
The two teamed up, and together they gave birth to what we now call CSS.
The core idea was simple but revolutionary: separate the presentation from the content. HTML should describe what things are. CSS should describe what things look like. Two jobs, two tools, clean separation.
The World Wide Web Consortium, known as the W3C, published the first official CSS specification on December 17, 1996 — CSS1.
CSS1 was basic by today's standards, but it was a huge deal. It introduced:
For the first time, developers could write one stylesheet and have it apply to an entire website. Change one value, update everything. That was the dream.
CSS2 arrived in 1998 and added more power. It brought in:
absolute, relative, fixed)Developers could finally start building more sophisticated layouts. But browser support was still inconsistent and frustrating. Internet Explorer and Netscape had their own opinions about how CSS should work, and developers spent enormous time fighting those differences.
The late 1990s and early 2000s were rough. Internet Explorer 6 ruled the browser market and had terrible, buggy CSS support. Developers constantly wrote CSS hacks just to make things look the same across browsers.
Websites like CSS Zen Garden (launched in 2003) proved something important: the same HTML could look completely different depending on the CSS applied. That demonstration alone changed how the industry thought about styling.
CSS3 didn't arrive as one big release. It was broken into modules, each developed and shipped separately. Over the early 2010s, CSS3 features started landing in browsers, and the web transformed.
CSS3 introduced:
Flexbox alone was a massive shift. Before it, centering something vertically on a page was a rite of passage involving hacks, prayers, and approximately 40 Stack Overflow tabs.
CSS Grid landed in major browsers in 2017 and gave developers a true two-dimensional layout system. Complex magazine-style layouts that used to require hundreds of lines of hacked CSS were suddenly possible in 10 clean lines.
Since then, CSS has kept growing:
The CSS of 2024 is practically a different language from CSS1.
HTML tells the browser what something is. CSS tells it how it looks. This clean split makes code easier to write, read, and maintain.
Example: Change your entire website's primary color by editing one CSS variable, instead of opening 200 HTML files.
Before CSS, making a sitewide style change meant editing every single page by hand. With CSS, one stylesheet controls everything. Update it once, done.
A linked CSS file is downloaded once and cached by the browser. Every page on the site reuses that cached file. Compared to stuffing inline styles into every HTML page, this is a huge performance win.
CSS media queries made it possible to build one website that works beautifully on a phone, a tablet, and a widescreen monitor. Without CSS, responsive design simply doesn't exist.
CSS lets developers control contrast, font size, spacing, and focus states — all things that make the web more usable for people with different needs and abilities.
From full-page animations to custom scroll effects to complex grid layouts, CSS gives designers and developers the tools to build experiences that are genuinely beautiful, not just functional.
| Feature | Before CSS (1991–1995) | After CSS (1996–Now) |
|---|---|---|
| Layout | HTML tables only | Flexbox, Grid, full control |
| Fonts | Browser default, no control | Any font, any size, any weight |
| Colors | Limited browser-set colors | Full 16 million hex colors |
| Responsiveness | Impossible | Built-in with media queries |
| Maintenance | Edit every file manually | One stylesheet rules all |
| Animations | None (without Flash/JS) | Native CSS transitions and keyframes |
| Code cleanliness | Presentation mixed in HTML | Clean separation of concerns |
| Reusability | Zero | Full — write once, apply everywhere |
✅ Do these:
:root and reference them everywhere.min-width media queries to build up.margin-inline, padding-block — for better internationalization support.clamp() for fluid typography — font-size: clamp(1rem, 2.5vw, 1.5rem) scales beautifully across screen sizes.❌ Avoid these:
!important to fix everything — it's a sign your specificity is broken, not a solution.rem, em, and % for better scalability.Most beginners don't realize that width by default doesn't include padding and border. This causes layouts to break in confusing ways. The fix: use box-sizing: border-box globally from the start.
*, *::before, *::after {
box-sizing: border-box;
}
Newcomers often reach for position: absolute when Flexbox or Grid is the right tool. Absolute positioning pulls elements out of the normal flow and creates fragile layouts.
Hardcoding color values like #fd6e4e in 40 different places means one brand refresh breaks your entire night. Custom properties exist exactly for this.
Dumping all your styles in one file with no structure is fine for small projects. On anything bigger, it becomes a nightmare. Learn BEM, or use a utility-first framework like Tailwind, or at minimum group related styles together.
Just because it looks right on your screen doesn't mean it works on a phone. Always test at multiple breakpoints, not just the one you're sitting at.
The web before CSS was a humble, honest thing — purely functional, almost zero visual design. And that was okay for what it was. But as the web grew into something people lived in, worked in, and built businesses on, it needed more.
CSS didn't just make the web prettier. It made it more maintainable, more scalable, more accessible, and infinitely more creative. It separated concerns, cleaned up HTML, and gave developers and designers a real canvas to work with.
From walls of unstyled text in 1991 to the rich, animated, responsive experiences of today — that journey runs directly through CSS.
If you found this history useful, or if you didn't know what a <font> tag was before today — welcome, and you're not alone. 😊
For more practical dev content like this, check out hamidrazadev.com — there's always something useful waiting there for you.
If this post helped you or taught you something new, share it with a developer friend who needs a solid CSS origin story. They'll thank you. 🚀