CSS Tutorial (basic)

OK before we start, a little background information on the subject! CSS stands for Cascading Style Sheet, I use it to style websites and neopets stuff written in HTML. It can be used to change fonts, colours, layouts etc. For example, this page uses an external style sheet - if taken away the layout would just be the contents in a table, with no colour or backgrounds etc.
OK enough of that, lets get started...

Your CSS code must begin within these tags found in the <head> </head> of a document:
<style type="text/css></style>

However on neopets, they have already got <style type="text/css></style> tags previously on the page, so you only need to put <style> </style>

Adding Backgrounds

One of the first things I do when starting to write my CSS is add a background:
body
{
background-image: url(
imageURL);
background-color:
#hexcolourcode;
background-attachment:
property;
background-repeat:
property;
background-position:
property;
}


Ok, but what does this all mean?
And thats it! everything about backgrounds you need to know!
back to top

Fonts

The second thing i usually do in my CSS is sort out my font, then my headers.
To change the font for the entire page, put the following:
body
{
font-family:
font;
font-size:
number pt;
font-weight:
property;
color:
#hexcolourcode;
letter-spacing:
number px;
text-decoration:
property;
text-align:
property;
}


There are loads of other things to do with fonts, but these are really the only important ones I use. However if you want to know more, then you can google ;)
Thats all you really need to know about fonts!
back to top

Headers

Ever wondered how people did those fancy headers? Well now you can find out :D Headers are a default thing and can be written in the main <body></body> as <h1>header title</h1>. They scale down in size, an example of this can be found here.

We can edit the style of headers like this:
h1
{
background:
#hexcolourcode;
color:
#hexcolourcode;
padding:
number px;
font-size:
number pt;
text-align:
property;
border:
properties;
}


You can put any property from the fonts section above into a header, I have only included a few but you can play around for your desired effect.
Those are all the basics you need to know! Check back soon for a more advanced section!