What is CSS?
CSS stands for Cascading Style Sheets. Basically, CSS is a language that manages the design and presentation of web pages -- the way things look. It works together with HTML, or HyperText Markup Language, which handles the content of web pages.
With CSS you can create rules to tell your website how you want it to display information. And you can keep the commands for the style stuff -- fonts, colors, and so on -- separate from the commands for the content.
They’re called “cascading” because you can have multiple style sheets, with one style sheet inheriting properties (or “cascading”) from others.
For a lot of people a plain old blog template is good enough. It’s only when you want to start customizing the look of a site that you need to delve into CSS.
Three Style Sheets
There are three kinds of CSS style sheets: external, internal, and inline.
External styles control how things look across many pages on a website.
Internal styles control the look of just one page.
Inline styles control just one element of a single page, even just a single word.
For more info on how these style sheets work together or “cascade” into one another, see this great tutorial from HubSpot.
Put simply, you can use multiple style sheets, and they will know how to defer to one another. Basically, inline overrides internal, and internal overrides external.
According to this CSS tutorial, you’re better off relying mostly on external styles, and avoiding the one-off stuff as much as possible.
You write out CSS commands and create a style sheet using a text editor. Then you link that style sheet to your HTML, and, voila, your site will now obey the rules you’ve set forth in the CSS style sheet.
There’s a lot more to CSS than what can be covered in a blog post. For example, as with any language, there’s a syntax that you have to learn, and we can’t cover that here. But if you're itching to get started ...
Just Enough to Be Dangerous
CSS code looks kind of weird at first glance. To give you an idea what it looks like, we've cribbed an example from a Mashable article on CSS. Take a look:
a:link {color:red;}
a:visited {color:purple;}
Translation: an unvisited link will appear in red, and a link that's been visited will be purple.
But it's not as techie as it seems. And again, a lot of people don’t ever need to touch CSS. However, if you do want to do some customization, you’ll need to come up to speed on CSS. If so, your best bet is to buy a book like this one to get caught up to speed, and then -- just start hacking away. The more you practice, the better and more fluent you'll be.
Image credit: Stefan Baudy