Learn CSS - The Complete Guide
Learn CSS - The Complete Guide
Guide
So you want to learn CSS?
We'll start with a basic explanation of what CSS is and how it works. Then
we'll get into the fundamentals of CSS, such as typography, layout, colors,
and backgrounds. After that, we'll explore some more complex areas of
CSS and take a peek at what the future of CSS may hold. And we'll finish
by looking at CSS preprocessors and animation.
In each section, we'll provide plenty of resources for you to use to learn
more about a particular area. With this CSS guide and the courses and
tutorials we link to within it, you have all the information you need to go
from CSS novice to pro.
1. What is CSS?
CSS stands for Cascading Style Sheets, documents that contain styling
rules that describe how HTML elements are displayed. CSS allows you to
control the layout of multiple web pages all at once.
CSS works hand in hand with HTML; HTML sorts out the page structure,
while CSS adds style, makes it look pretty, and allows you to introduce
subtle levels of interaction.
Multiple style rules can point to one HTML element, in which case there
needs to be a way to determine which rule should take effect. The term
cascading describes the process of filtering down from general rules, until
the most specific rule is encountered. That rule is then chosen to do its
work.
CSS is read by web browsers. They take the HTML markup document, and
then they apply the CSS styling rules to the elements within that document.
This guide assumes that you already have a basic understanding of HTML.
If you don't, you can get up to speed quickly in our short course on HTML
basics. By the end of this short course you’ll know what HTML is, how it
works, and how to use its most common elements.
2. The Fundamentals of CSS
CSS is all about targeting elements and styling them. These two tutorials
will get you started on the right foot:
It's time to master the fundamentals of CSS: typography, layout, colors, and
backgrounds.
In Start Here: Learn CSS Typography, you'll start by learning how CSS
affects the way a website displays, what CSS selectors are, what CSS
properties are, and the coding syntax you’ll need to know to write your own
CSS.
In our Start Here series of courses, Kezz Bracey will go on to show you
how to build the typographic foundation of your site, how to create the most
common types of layouts in web design, and how to breathe some life into
the site you’ve been creating using CSS colors and backgrounds.
Once you've got to grips with the basics of backgrounds, check out this
tutorial for an in-depth look at the upgraded background property and the
new capabilities beyond just adding a CSS background image or color.
CSS Positioning
CSS positioning is arguably the most fundamental skill in web design; it
powers layouts and hence forms the foundation of everything inside those
layouts. That said, it can be quite tricky to wrap your head around when
you are first starting out.
By the time you’ve finished this course, you’ll have a firm grasp of the
essential principles you need to drive your layouts. You’ll learn each of the
four types of positioning used in CSS, as well as how to work around some
of the oddities that can pop up when using them.
Keep Learning CSS
Follow the Masters
CSS is constantly evolving, and the best way to stay on top of your game is
to immerse yourself. Pay attention to what CSS celebrities are doing and
you will learn plenty. Here are just a few people on Twitter you should be
following:
● @chriscoyier
● @LeaVerou
● @csswizardry
● @rachelandrew
● @snookca
● @vlh
● @MeyerWeb
● @zeldman
● @jensimmons
● @simplebits
Weekly Digests
Learn in a Community
Why not find your own heroes on a social coding site like GitHub or
CodePen? The best thing about networks like these is the advice
everybody gives each other; if you have a CSS problem, someone will
have had it before you and will be willing to lend a hand. Remember, you
can always ask for help in our forum!
It's often the browser manufacturers themselves who experiment with CSS
properties, in the hope that their suggestions will be adopted by users.
Ultimately, it's down to the World Wide Web Consortium (W3C) whether
CSS properties are standardized or not.
Here are some useful resources which will help you on your way:
3. Next-Level CSS
Once you've mastered the fundamentals, there's still lots to learn to really
make the most out of everything CSS has to offer, from frameworks that
help you organise your CSS to CSS libraries and creating flexible grid-
based layouts using the box model.
SMACSS
SMACSS (Scalable and Modular Architecture for CSS) is a set of CSS
guidelines which organizes your CSS rules into reusable modules. In this
course, Adi Purdila will introduce you to this great front-end framework!
CSS Layout
CSS was never really intended for laying out complex interfaces; it was
created with simple documents in mind. As such, its journey has been a
difficult one.
Nowadays, however, CSS is capable of a great many things where layout
is concerned, as these courses will testify. Follow our instructors to master
the box model, take control of grid-based layouts, and use Flexbox to
create flexible interfaces.
CSS Projects
Now it's time to build on what you've learned by trying some practical
projects! These three courses use CodePen so you can easily follow along.
Next-Level Courses
Take some time to explore the incredible results you can achieve using
next-level CSS. These CSS courses and tutorials are perfect for expanding
your knowledge and digging further into clipping, masking, grids, blending
modes, counters, and units.
4. CSS Preprocessors
What Is a CSS Preprocessor?
A CSS preprocessor is a scripting language that extends CSS and allows
you to do a number of things and can dramatically improve your workflow.
Preprocessors help you to write well organised code that's easier to
maintain and allow you to use code shared by other people, but the biggest
advantage is that they save you time.
You can learn more about CSS preprocessors by checking out these
resources:
5. CSS Animation
Motion has become a really important part of the web design field in recent
years. Motion and animation add layers of dimension to an interface, aiding
the user, offering feedback, delighting, and engaging along the way.
CSS animation techniques are often a web designer’s gateway into the
world of motion, and the best way to get started is to check out our
complete guide:
https://webdesign.tutsplus.com/series/learn-css-the-complete-guide--cms-
1065