Monday, 16 September 2013

The magical world of CSS Stylesheets.

If HTML is the skeleton of the website, CSS must be all the other good bits. Terrible analogy, I know, but CSS does so much stuff that would be impossible or extremely time consuming to do in HTML code.
Basically it organizes the looks and formatting of your website.

For your stylesheet to take any effect, you have to link the two on your HTML code.
Like so:

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

The pink text is where the link to your stylesheet goes.


It works a little differently to HTML, but it's not too different.

h1 {color:blue; font-size:12px;}

Selector       Syntax

The selector works by, well, selecting the element of the html that you want to modify.

The syntax is what you want to do to the selection.




No comments:

Post a Comment