Html Tips and Tricks

Thursday, July 01, 2004

Introduction to Stylesheets

Note: Please learn other html before you advance to stylesheets.

What are stylesheets???

They are a sheet of code right below your <head> which change the the rest of the page, making it more stylish. It can change how bullets, paragraphs, images, etc. all look.

Writing stylesheets

The basic way you write a stylesheet is...


<style type="text/css">
TYPE OF HTML TAG{property: value; secondproperty, value}
</style>



So, let's say you wanted to change how paragraphs look. (paragraphs are made with <p> and </p>
This is how you do it, if you wanted to change the color of paragraphs:

<style type="text/css">
P{color: "green"}
</style>

Observe that since we wanted to change only one property of paragraphs, we simply left out the second property.
....hmmm....
If that stylesheet code was inserted right after the <head>, then all text put between <p> and </p> will be green!.

Now you know some basic principle on creating a stylesheet and stylesheets are one of the best tricks you can have among all the html code on your web page.

In paragraphs, you can also change the font-size and much more.
Instead of changing paragraphs, you can change bullets, or more.

Advanced CSS


NEED EXTRA HELP? HAVE A SUGGESTION? HAVE SOMETHING TO ADD? PLEASE POST COMMENTS WHILE LOOKING AT ALL THESE USEFUL HTML TIPS AND TRICKS. THANK YOU!

1 Comments:

Post a Comment

<< Home


Hit Counter