

| Table of Contents | CSS Lesson 1 | CSS Lesson 1 Part 2 | CSS-Lesson 2 |
| CSS Lesson 3 Part 1 | CSS Lesson 3 Part 2 | Comming Soon | Comming Soon |
CSS Lesson 2In the past, you might have done this for a H1 header that you wanted to have green like the one above. <font color=”#027A65”><h1>Basic CSS Lesson 2<h1></font>That would have produced this CSS Lesson 2 A little big for most pages maybe, so to make it blend in with the site presentation, you might have tried an h2 or h3 tag. This might make it look better on you page, but those tags do not carry the same weight as an h1 tag when it comes to search engines. So here is how I would do the H1 tag in a style sheet: h1 {And here is what you get:
It might look like a little more work up front, but now I don’t have to add the other tags. All I have to do as add the <h1></h1> and the rest is taken care of including the new size. I even add an element, “letter-spacing: 2px;”, to space the letters out a little to make it look a little more dramatic. OK here is a complete style sheet that you could cut and paste to use, With just a few personal touches, you could use it on your site. Here is the link for the style sheet that you could cut and paste in between the head tags on your page. <link href="yourstyleshhet.css" rel="stylesheet" type="text/css"> Just change the yourstylesheet.css to anything you want. Then just save the style sheet that you make up with the same name. body { OK there it is. Your basic style sheet. I added the “P” paragraph element as I like to indent my paragraphs. As you noticed I also defined my links here also. I set the normal link to have no underline till the mouse is over it. That’s the hover stage and then the link changes color and is underlined. Just these few tags can give you a lot of flexibility in the presentation of your text. I’ll give you a couple of more elements to play with before I end Lesson 2. Have you noticed how the first letter in each paragraph is a little bigger and a different color? You know how in print articles they like to use what is called drop letters? That big letter sometimes the size of two or three lines of text at the beginning of a paragraph. Well this is not quite that big but it gives the same sort of effect without the use of an image. P:first-letter ( Try it out, it can add a little flair to a plain looking paragraph. Note! This is added separately from the standard paragraph element. You would use both if you wanted to add an indent also. For those that wanted to add a background image into their page, you would add the following to the body selector. body { The first adds a black background color and also the background image, while the second adds just the image by itself. Whenever you add a background image to your page, it’s a good idea to add a background color that matches or at least nearly matches. It may take your image a few seconds to load depending on its size, and if your text color is dependent on the color of the image, you wont have missing text till the image shows up. Lesson 3 will cover a few more basics and an intorduction to some intermediate CSS. |
| Table of Contents | CSS Lesson 1 | CSS Lesson 1 Part 2 | CSS-Lesson 2 |
| CSS Lesson 3 Part 1 | CSS Lesson 3 Part 2 | Comming Soon | Comming Soon |