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 following your tuts man!

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

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

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

    ReplyDelete
  6. external is much more organized imo!

    ReplyDelete
  7. Already knew this but thanks mate!

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

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

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

    Fizollowing.

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

    ReplyDelete
  12. 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
  13. Should be helpful! Thanks for the nice tutorial!

    ReplyDelete