CSS for the Newbie
(Page 1 of 5 )
Although style sheets have technically been around in one form or another since the 1970s, it wasn't until around 1996 that they truly became an official part of the web. And although they had a rocky start with browser support, today they are widely used and offer designers a simple way to define style rules for their web pages, saving them from having to type in colors, fonts, and other layout properties over and over again.
CSS stands for Cascading Style Sheet by the way. The style part defines how the HTML elements will be displayed in the browser, the sheet is where you store the styles, and the cascading occurs when you use multiple style definitions. A little confusing? It'll be clear by the end of this tutorial.
Before we begin, I am going to make a few assumptions:
You know HTML
You know how to create basic websites
You have a text editor like Notepad
You have a pair of parachute pants like MC Hammer and will wear them as you read this tutorial (okay, that's optional)
Writing CSS
CSS syntax is made up of three different parts:
The Selector
The selector is typically whichever element or tag in HTML to which you wish to give a definition (such as the <body>, <h1>, <p>, <tables>, <lists>, etc.).
The Property
The property represents the attribute of the tag/element you wish to change. It is separated from the Selector by a semicolon. Some properties you can change are color, font, height, width, alignment, and so forth.
The Value
The value is what you want to change the property to. For instance, I might want to change the font color to red. I would do so by changing the value to red.
Next: Putting it all Together >>
More Style Sheets Articles
More By James Payne