David Croushore

A Man in Progress

Intro to CSS and XHTML

I’ve played with CSS and XHTML before.  Mostly by using a WYSIWYG editor like Adobe Dreamweaver and playing around with the CSS to see what the effects were.  That’s a great way to get acquainted, but if I’m going to take on a web development project, like redesigning this blog for instance, I’m going to need a more structured understanding of CSS and XHTML.

So today I picked up some of the basics.  First, I learned the proper syntax of a CSS rule.  I didn’t even know to call it a rule, so that’s probably a good start.  Here’s a quick rule I can use:

h1 { color: #333; font-size: x-large; }

Where h1 is the selector, color and font-size are properties, and #333 and x-large are values for those properties. 

Using a list of rules, I can set up a style sheet that will format every element of my website the same way on every page, which makes it much easier to build multiple pages without having to get bogged down in the code for each one.

Soon, I’ll figure out how to actually create a style sheet for this blog, but until then, it’s good to have the basics down.

Comments
blog comments powered by Disqus