1. Computing

Video:How to Know if You Need CSS for Web Design

with Dimitri LaBarge

CSS is a time-saving and powerful web design tool. However, it's not always easy to learn. Here's a visual explanation of what CSS is, what it does, and whether or not it's necessary for your webpage.See Transcript

Transcript:How to Know if You Need CSS for Web Design

Hi, this is Dimitri LaBarge for About.com, and today we're going to talk about how to know if you need CSS for web design.

The Evolution of CSS

CSS stands for Cascading Style Sheets, and it's a way to manage your page layout in a sophisticated way. CSS exists because the base language of the web, HTML, was not designed for any kind of sophisticated formatting. There was no way to accurately place elements. You might break up a paragraph with a "p" tag, or maybe get flashy with a "center" tag. HTML is a little more flexible now. You can specify fonts, you can have reasonably complex page layouts. You can use Flash in lieu of HTML for sophisticated multimedia presentation.

CSS Lets You Control How HTML Elements are Displayed

If you're just building a homepage for personal use, chances are you don't need to learn CSS. But if you want to really have control over your pages, then you need to learn this crucial tool. CSS attributes let you control how HTML elements are displayed, through the use of STYLES. All formatting is removed from the base HTML code, and instead, controlled via a style sheet.

An Example of CSS in Action

Here's how you might define a style in a CSS style sheet:

  • p.centered {text-align: center;}

This defines a class called centered, that will be used with the HTML paragraph tag. Inside the curly brackets, we set a center text-alignment style. Now, we drop down to the HTML body itself, where we start a new paragraph. But in that paragraph tag we refer to our centered tag. Now everything in that paragraph will be centered. You can set everything from color to specific page placement this way:

  • p class=”centered”>This is centered text!</p>

CSS Can Be a Huge Time Saver

A style sheet can be located on the HTML page itself, or it can be loaded externally, as a template. This means that many pages can refer to a single reference. And if you change an attribute there then every page that calls to that document updates automatically, which is a huge time saver. If this kind of modularity and flexibility is important to you, then definitely consider using CSS.

Thanks for watching. To learn more, visit us on the web at About.com.

About videos are made available on an "as is" basis, subject to the User Agreement.

©2013 About.com. All rights reserved.