What's new with CSS3?

Cascading Style Sheets - CSS for short - give you creative control over the layout and design of your web pages. Using CSS, you can dress up your site's text with eye-catching headlines, drop caps, and borders, just like the ones in glossy magazines. You can also arrange images with precision, create columns and banners, and highlight your links with dynamic rollover effects. You can even make elements fade in or out of view, move objects around the page, or make a button slowly change colors when a visitor mouses  over it.

Anything that can do all that must be pretty complicated, right? Au contraire! The whole idea behind CSS is to streamline the process of styling web pages.

 

How CSS Works

CSS works with HTML, but it's not HTML. It's a different language altogether. While HTML provides structure to a document by organizing information into headers, paragraphs, bulleted lists, and so on, CSS works hand-in-hand with the web browser to make HTML look good.

For example, you might use HTML to turn a phrase into a top-level heading, indicating that it introduces the content on  the rest of the page. However, you'd use CSS to format that heading with, say, big and bold ed type and position it 50 pixels from the left edge of the window. In CSS, that text formatting comprises a style - a rule describing the appearance of a particular portion of a web page. A style sheet is a set of these styles.

You can also create styles specifically for working with images. For instance, a style can align an image along the right edge of a web page, surround the image with a colorful border, and place a 50-pixel margin between the image and the surrounding text.

Once you created a style, you can apply it to text, images, headings, or other elements on a page. For example, you can select a paragraph of text and apply a style to instantly change the text's size, color, and font. You can also create styles for specific HTML tags, so, for example, all first-level headings(<h1> tags) in your site are displayed in the same style, no matter where they appear.