CSS

CSS is something which customises the appearance of your web page. As many attributes are becoming deprecated, for a valid website, you will have to use CSS to customise the appearance of it.

There are loads of selectors to use, so I will list the most common ones in another post.

CSS is a style. It can be a style sheet or as an attribute.

Internal Style sheets

Style sheets can be put directly into your HTML document as an internal style sheet.

The <style> tag is used if you want to put an internal style sheet into your HTML document. These are always placed inside the head section.

Remember to put the type attribute in the <style> tags. So it would look like <style type="text/css">
e.g.

<html>
<head>

<style type="text/css">
/*Your style sheet goes here*/
</style>

</head>
<body>
Content in here.
</body>
</html>

External Style sheets

If you don’t want to have an internal style sheet because it may be a large file or you just want to keep it organised. You can save your style sheet as a separate file, with the extension .css.

Use this tag:

<link rel="stylesheet" type="text/css" href="stylesheet.css">

And place it in the head section. Remember to change the stylesheet.css to what your style sheet is called (make sure you leave the .css on).

Style Attribute

Style attributes is a inline style for an element.

You just place the attribute: style="value" in the tag you want it to change.

e.g.

<h1 style="color:pink">Some example text</h1>

Further reading

Share

  • Digg
  • del.icio.us
  • StumbleUpon
  • Technorati
This entry was posted in CSS, Tutorials. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

kao_happy.gif kao_kiss.gif kao_cry.gif kao_wink.gif kao_blank.gif kao_yes.gif kao_cheering.gif kao_mad.gif kao_mouth_shut.gif kao_sweat.gif kao_sick.gif kao_posh.gif kao_shocked.gif kao_no.gif kao_love.gif kao_lol.gif kao_laughing.gif heart_bounce.gif kao_evil.gif kao_blush.gif kao_regular.gif kao_tongue.gif kao_big_grin.gif kao_confused.gif kao_cute.gif kao_smile.gif kao_sad.gif kao_cool.gif