Cascading Style Sheets Explained

If you’re new to Cascading Style Sheets, or CSS, then this short guide is for you. After a brief introduction to CSS and some of its benefits, we’ll move on to CSS frameworks to help you decide if you should use one and if so, which one would be best for your needs.

Cascades

What is CSS?

CSS is a computer programming language used for describing the visual presentation of a HTML document. It helps separate content and presentation, including layout, colors, and fonts. CSS is one of the cornerstones of the web. Without CSS, web pages would be dull and boring, mostly just white pages with blue links.

What does the "cascading" in CSS mean?

One of the fundamental design principles of CSS is cascading, which allows several style sheets to influence the presentation of a document. The "cascading" in CSS refers to the fact that styling rules "cascade" down from several sources. This means that CSS has an inherent hierarchy and styles of a higher precedence will overwrite rules of a lower precedence.

What's the latest version of CSS?

In 1997 web design became much easier thanks to the introduction of CSS. Originally created to separate the content and structure of a web page from the visual design, CSS allows designers to make changes to the visual elements of hundreds of pages by changing one, or a few, lines of code. No longer did a web designer have to sort through each page to change the same code multiple times.

Over the years, CSS has blossomed and current version 3 now supports:

  • Transitions and Animations
  • Media Queries
  • Flexible Layouts
  • …and much more.

The image below shows just how CSS has grown over the years from version one through to the current third version of CSS.

CSS versions

5 Absolutely Obvious Benefits of CSS

We’ve already mentioned that using CSS helps improve web design efficiency. To achieve this, a style sheet is created that exists externally as a separate file, internally inside of the HTML between the <head> tags, or inline within the <body> of the HTML itself. So, how does using CSS help?

1. Speeds up the web design process

Each CSS selector then refers back to the style sheet for instructions on how to visually display the element. Thanks to this, when you want to change something universally on your site, editing the code on the external or internal style sheet will ensure the changes are reflected on all pages.

For example, if you’re using an external style sheet file, and you want to change a font choice on your website, you only need to edit the CSS file once and the new font is displayed everywhere where the old one was.

2. Helps with consistency

Not only does CSS help speed up development, but it also ensures consistency across all pages on your site. If each page refers to the same style sheet, everything will look and work the same.

3. Easy accessibility

Using CSS also makes it easier for others to make changes to a website. If you hire a new designer to work on your site, they can view and edit all the styling information in one CSS file, rather than having to search through and edit tens or even hundreds of individual pages.

4. More powerful than HTML alone

CSS also provides you with many more presentation capabilities than HTML does. Using <div> capabilities, for example, replaces tables.

Setting screen percentages for page elements allows for more flexibility in the presentation of content blocks on a page. There are also formatting options available in CSS that HTML does not provide, such as setting the spacing between characters and text.

5. Widely supported

Finally, CSS is not only easy to learn but it works across all major browsers. With support for Internet Explorer, Edge, Chrome, Firefox, Safari, and Opera your site will look the same for all visitors.

Learn to code CSS

Where to Learn CSS?

For beginners, CSS is a great language to learn because it is easy to grasp and there are a ton of free resources and tutorials available.

CSS: The Definitive Guide

CSS: The Definitive Guide

This revised edition provides a comprehensive guide to CSS implementation, along with a thorough review of the latest CSS specifications.

By Eric A. Meyer, Estelle Weyl

https://google.com/books/
CSS: The Missing Manual

CSS: The Missing Manual

This fully updated edition provides the most modern and effective tips, tricks, and tutorial-based instruction on CSS available today.

By David Sawyer McFarland

https://google.com/books/
CSS Secrets: Better Solutions to Everyday Web Design Problems

CSS Secrets

CSS Secrets shows you how to solve problems with code. This practical guide provides 47 undocumented techniques and tips to help intermediate-to advanced CSS developers devise elegant solutions to a wide range of everyday web design problems.

By Lea Verou

https://google.com/books/
CSS Cookbook

CSS Cookbook

This book offers hundreds of practical examples for using CSS, and includes code samples you can use right away. You'll find exactly what you need, from the basics to complex hacks and workarounds.

By Christopher Schmitt

https://google.com/books/
HTML and CSS: Design and Build Websites

HTML and CSS

A full-color introduction to the basics of HTML and CSS in a way that makes them accessible to everyone — hobbyists, students, and professionals.

By Jon Duckett

https://google.com/books/
Learn to Code HTML and CSS: Develop and Style Websites

Learn to Code HTML and CSS

The book includes an exercise focused on cleaning up a web page by improving the user interface and design, solely using HTML and CSS.

By Shay Howe

https://google.com/books/
Head First HTML and CSS: A Learner's Guide to Creating Standards-Based Web Pages

Head First HTML and CSS

Learn HTML and CSS in a way that won't put you to sleep. If you've read a Head First book, you know what to expect: a visually-rich format designed for the way your brain works.

By Elisabeth Robson, Eric Freeman

https://google.com/books/
Learning Web Design: A Beginner's Guide to HTML, CSS, JavaScript, and Web Graphics

Learning Web Design

This friendly guide is the perfect place to start learning how the web and web pages work. Each chapter provides exercises to help you learn various techniques and short quizzes to make sure you understand key concepts.

By Jennifer Robbins

https://google.com/books/
Beginning HTML5 and CSS3 For Dummies

Beginning HTML5 and CSS3 For Dummies

Beginning HTML5 and CSS3 For Dummies is the perfect first step for getting started with the fundamentals of web development and design, an ideal introduction to HTML5 and CSS3 for beginners with little to no web development experience.

By Ed Tittel, Chris Minnick

https://google.com/books/
Core CSS: Cascading Style Sheets

Core CSS

This new edition of the book incorporates the latest browser-specific extensions to CSS, as well as the CSS3 specification, providing the most up-to-date information on CSS currently available.

By Keith Schengili-Roberts

https://google.com/books/

Online courses, tutorials, tips and tricks

  1. Learn CSS: In this Codecademy CSS course you’ll learn all the basics of CSS: how to set up the correct file structure, edit text and colors, and create attractive layouts.
  2. Introduction to CSS3: Taught by the University of Michigan, this Coursera CSS course is designed to teach you CSS rules, how to test code, and how to establish good programming habits.
  3. The Complete Guide to CSS 2021: Learn CSS for the first time or brush up your CSS skills. This Udemy course covers it all - students start at the very basics and gradually dive in deeper and deeper.
  4. Team Treehouse: Has over 40 CSS-related videos and workshops. And they add new courses all the time.
  5. A List Apart: Collection of great articles about web design and best practices for developers who put a strong emphasize on standards-compliant designs.
  6. Smashing Magazine: Articles all around CSS, JavaScript, front-end, UX and design. For designers and web developers.
  7. CSS Guidelines: High-level advice and guidelines for writing sane, manageable, scalable CSS.
  8. CSS-Tricks: Interesting CSS tutorials, tricks and tips.
  9. Mozilla Developer Network: Great free and updated reference guide for CSS.
  10. CSS Reference: An extensive CSS reference with all the important properties and info to learn CSS from the basics.
  11. W3 Schools: Well organized and easy to understand web development tutorials with lots of examples of how to use HTML, CSS, etc.

Inspiration

Inspiration & Playground

Some great resources for inspiration and practice your CSS coding skills.

  1. Awwwards: Website Awards that recognize and promote the talent and effort of the best developers, designers and web agencies in the world.
  2. Dribbble: A design portfolio platform, jobs and recruiting site and is one of the largest platforms for designers to share their work online.
  3. Siteinspire: A showcase of the best web design inspiration, featuring over 7,000 websites and profiles of the digital agencies, designers and developers who made them.
  4. CodePen: An online code editor, learning environment, and community for front-end web development using HTML, CSS and JavaScript code snippets, projects, and web applications.
  5. FreeFrontend: Free hand-picked HTML, CSS and JavaScript (jQuery, React, Vue) code examples, tutorials and articles.
  6. Codrops: Experiments, plugins and articles related to web development and programming.
  7. UX Planet: One-stop resource for everything related to user experience.
  8. UpLabs: A place to find high-quality design resources for designers, creative agencies and developers.

What is CSS Framework?

CSS Grid

In software development, those who create applications often rely on a set of frameworks that help standardize things. In web design, a framework is a package that consists of pre-built files that make web design and front-end development faster and easier.

CSS frameworks are extremely popular among web designers because they lay out the foundation of a site for them. These frameworks often include the code that provides:

  • A CSS reset to ensure the different browser rendering of HTML will not overwrite your stylesheet
  • A grid layout to assist with responsive web design
  • The typography elements
  • Icons
  • Styling for visual elements like buttons, forms, and tooltips

Many frameworks include additional elements such as JavaScript functions or GUI elements to help with the front-end development of web applications.

3 Major Advantages of CSS Frameworks

If using a style sheet for your website helps speed up design time, imagine what having all the core design elements built for you would do? That’s right. It makes it even easier and faster to build web content.

1. Faster development times

This is why many designers use CSS frameworks for their work. With the basics already taken care of, all you need to do is change the visual stylings to meet your needs.

2. Tried and tested code

Another advantage of using a CSS framework is the fact that you know the code works. Thousands of designers use the top frameworks, and they have tested and vetted everything already. There should be no issues with functionality or compatibility.

3. Follow proven design best practices

Finally, CSS frameworks encourage good design and good coding practices. Using their grids makes it easier to organize media and content on your site in a visually appealing way. Referencing well-documented code helps instill best practices in your own work. And seeing what clean CSS look like can help make you a better designer.

List of 30 Most Notable CSS Frameworks

Name IE Chrome Firefox Opera LESS SASS Mobile License
VCL 11+ latest latest latest MIT
Bulma 11 latest latest latest MIT
mini.css 11+ 21+ 28+ 17+ MIT
Pure CSS 8+ latest latest BSD
Tent CSS 11+ 21+ 28+ latest MIT
w3.css latest latest latest latest MIT
Blueprint CSS 10 latest latest latest MIT
ResponsiveBP 9+ latest latest latest MIT
Bootstrap 8+ latest latest latest MIT
Semantic UI 9+ latest latest 12+ MIT
Foundation 9+ latest latest latest MIT
UIkit 9+ latest latest latest MIT
960 Grid System 7+ latest latest latest GPL & MIT
99lime HTML KickStart 8+ latest latest latest MIT
Skeleton 7+ latest 3+ latest MIT
Kube 8+ latest latest latest Open Source
Less Framework 7+ latest latest latest MIT
Flaminwork 7+ latest latest latest Open Source
G5 Framework 7+ latest latest latest Open Source
Easy Framework 7+ latest latest latest CC
Blueprint 7+ latest latest latest MIT
YAML 6+ latest 3.6+ 10+ CC-BY
BlueTrip 7+ latest latest latest Open Source
YUI CSS 8+ latest latest latest BSD License
52framework 6+ 4+ 3+ latest CC
elastiCSS 7+ latest latest latest MIT
Boilerplate 7+ latest latest latest New BSD
Emastic 5+ 3+ 3+ 9+ Open Source
Malo 5+ 3+ 1.5+ 8+ MIT
Dismantle.gs latest latest latest latest MIT

A Closer Look at the Best CSS Frameworks

If you think using a CSS framework is right for you, then you’re going to have to decide which one to use; and there are hundreds to choose from.

So to save you time and increase your chances of finding the right one, we have listed some of the more popular frameworks below along with a brief review of them to help you decide.

Bootstrap

CSS Bootstrap Framework

Bootstrap, originally developed by Twitter in 2011, is the most popular of the CSS frameworks with over 116,000 stars on GitHub. Its use by Twitter for consistency across their products is not the only reason for its success, however.

Built with the core principle of being a mobile-first framework many web designers turn Bootstrap to produce a strong core for their responsive web design projects.

Some of the advantages of Bootstrap include:

  • Responsiveness
  • Modularity
  • Inclusion of starting templates and layouts
  • Large community for support and learning
  • Large number of third-party plugins available

On the downside, Bootstrap’s GUI Customizer is basic. For example, it does not include a color picker so you will need to know the color values and enter them manually when making changes. The documentation for Bootstrap is also not as strong as some of the others on this list.

Semantic UI

Semantic UI CSS Framework

Released in 2013, Semantic UI focuses on tying natural language principles into the framework to make the code easier to read and understand. With over 37,000 stars on GitHub, it’s the second most popular CSS framework available.

Some of the pros to the Semantic UI framework are:

  • Use of the Font Awesome icon set, although some designers may find these overused
  • Responsiveness
  • Modularity
  • Inclusion of starter templates
  • Excellent documentation
  • Tutorials for customizing and creating themes

As for drawbacks to this framework, there is no GUI customizer included. All customizations require manual editing. Also, there are no extras or add-ons available.

Foundation

Foundation CSS Framework

The Foundation framework from Zurb claims to be, “the most advanced responsive front-end framework in the world.” Built in 2011, it has had some time to mature into a rather advanced framework.

This framework combines some of the aspects of the first two on this list: semantic language focus for clean markup with a mobile-first mentality.

With over 26,000 GitHub stars, Foundation lies in the middle of the pack in terms of popularity. However, it boasts some good features including:

  • Excellent tutorial and learning center
  • Certification program to show mastery
  • Good starter themes
  • Email framework for newsletters, marketing collateral, and other email needs
  • Unique icon-set from Foundation
  • Business focused
  • Responsiveness
  • Modularity

While Zurb’s Foundation does offer excellent learning resources, the documentation is not as strong on their site. There are multiple third-party resources available though. The GUI customizer is also rather basic, equaling that of Bootstrap.

Pure

Pure CSS Framework

Created by Yahoo! in 2013 Pure relies on minimalism as its focus. With over 17,000 GitHub stars, this framework is popular in part because it is so lightweight and encourages customization.

To give you an idea of how bare bones Pure is, there is no icon-set included in the framework. You can use Font Awesome if you choose, but nothing comes pre-configured with the download.

As far as the pros are concerned, Pure offers:

  • Basic starter templates
  • Small file size
  • Responsiveness
  • Modularity
  • Clean framework for designers who only need specific components
  • Basic GUI skin builder

While some see the minimalist approach as a benefit, beginners will likely see this as a drawback. Other cons to Pure are the documentation, which is not too strong, and the fact that there are no add-ons or extras available.

UIkit

UIkit CSS Framework

The final CSS framework we’re going to look may be only approaching 11,000 stars on GitHub, but it has a lot to offer. Developed in 2013 by YOOtheme, UIkit focuses on, “developing fast and powerful web interfaces”. Most beginners will find this a solid starting place due to the large library of themes and templates.

The other pros that UIkit offers include:

  • Responsiveness
  • Modularity
  • Unique icon system, using SVG, that is continually growing
  • Available extras and add-ons, however, they do charge for the Pro version
  • An advanced GUI customizer for the available themes and templates

Some of the negative aspects of UIkit include the need to purchase a membership for access to the advanced features in the Pro version. For beginners working with Joomla! or WordPress this may be a wise purchase. Also, the documentation is not as strong as the others on this list.

Conclusion

There is no question that CSS takes web design to the next level. This is even easier when you employ a solid framework as the foundation of for your code.

Remember, though, that when you work with a framework you want to customize it as much as possible. The last thing you want is for your website to look like every other site built with the same framework by a designer who didn’t make any changes to it.