Saturday, August 20, 2011

CSS3 Tutorial 3: Adding style sheets to your HTML document

There are 2 ways of adding Stylesheets to your document, Internal stylesheets and External stylesheets.
The easiest and most efficient way is using external style sheets, which is making your HTML document look at a separate CSS file and using that, With Internal Stylesheets the document reads a stylesheet which is contained in the same document; External stylesheets must end in .css.

Using an external stylesheet
In your <head> section of your document simply put
<link rel="stylesheet" type="text/css" href="stylesheet.css" /> 
You can name your stylesheet whatever you like, the stylesheet document must end in .css

Using internal stylesheets
In your <head> section put
<style type="text/css">
[your css here]
</style>


18 comments:

  1. i don't know too much about coding. perhaps you can teach me sometime?

    ReplyDelete
  2. I love your TUTS man. I check for these everyday!

    ReplyDelete
  3. thanks :D once again another brilliant tutorial ;)

    ReplyDelete
  4. I haven't heard about CSS since my Computer Science days in High School. Nice refresher.

    ReplyDelete
  5. external is much more organized imo!

    ReplyDelete
  6. Already knew this but thanks mate!

    ReplyDelete
  7. what carlin said, will look forward to the stuff I don't know

    ReplyDelete
  8. I love these tuts man. Thanks for em

    ReplyDelete
  9. I've been customizing my blogs a lot lately, really need some serious css info. Love this blog.

    Fizollowing.

    ReplyDelete
  10. Nice man :) learned again some more :D

    ReplyDelete
  11. Good to see we're getting into CSS now, this should be quite useful. I've been wanting to learn it in depth for a while. Maybe getting it bit by bit will help me out.

    ReplyDelete
  12. Should be helpful! Thanks for the nice tutorial!

    ReplyDelete