Web Design

CSS Introduction



HTML uses tags to describe content.

<h1>This is my headline </h1>
<h2>This is a sub-heading </h2>
<p> This is my paragraph</p>

CSS is used to describe content for the tags.

h1 {color:blue;font:arial;text-align:center;}

An easier way to read this code is to write it like this:


You can also create a "class" of text. Below I created a class called "code".

In the middle of this sentence, the colour will be different

<p>In the middle of this <span class="code">sentence, the</span> colour will be red</p>

This was written in my CSS document like this:


Try to keep your CSS in one document, and attach it to your web page. Text > CSS Styles > Attach Style Sheet...

For more detail on CSS, go to http://www.w3schools.com