Draac.Com - Building A Better Internet


  Easy CSS Tricks

  Table Tricks

  Html Test Bed

QuickLinks - What Are These ? DraacMail Web Tools - Resources The Board Home - Draac.Com
Draac.Com's CSS Course
Page 2 - CSS Course
Building A Web Page With CSS
  Adding Headings
In this section we will add a couple of headings. For each heading added we will assign them their own attributes which will govern that heading. For example we can assign font size, color, weight style and alignment to each heading we create.

Lets add the first heading to our code.

<HTML>
<HEAD>
<TITLE>My First CSS Web Page</TITLE>
<STYLE TYPE="text/css">
BODY { background: #000000 url(stars.gif); }
A:LINK { color: #ffffff; }
A:VISITED { color: #ffff00; }
A:ACTIVE { color: #ff0000; }
H1 { font-size: 24pt;
        font-weight: bold;
        color: #66ccff;
        font-style: italic;
        text-align: center; }
</STYLE>
</HEAD>
<BODY>
</BODY>
</HTML>

Now lets add the heading itself to our CSS page.
This will be set within the <BODY> of our code.

<HTML>
<HEAD>
<TITLE>My First CSS Web Page</TITLE>
<STYLE TYPE="text/css">
BODY { background: #000000 url(stars.gif); }
A:LINK { color: #ffffff; }
A:VISITED { color: #ffff00; }
A:ACTIVE { color: #ff0000; }
H1 { font-size: 24pt;
        font-weight: bold;
        color: #66ccff;
        font-style: italic;
        text-align: center; }
</STYLE>
</HEAD>
<BODY>
<H1>My First CSS Web Page</H1>
</BODY>
</HTML>

check Click To View Our Page Here

Now when ever you use <H1> and </H1>
to any text on your page it will take on the
attributes you have asigned to that heading.

Let's add a second heading to our web page
with a set of new attributes assigned to it.

<HTML>
<HEAD>
<TITLE>My First CSS Web Page</TITLE>
<STYLE TYPE="text/css">
BODY { background: #000000 url(stars.gif); }
A:LINK { color: #ffffff; }
A:VISITED { color: #ffff00; }
A:ACTIVE { color: #ff0000; }
H1 { font-size: 24pt;
        font-weight: bold;
        color: #66ccff;
        font-style: italic;
        text-align: center; }
H2 { font-size: medium;
       font-weight: 200;
       color: #ffffff;
       font-style: normal;
       text-align: left;
       text-decoration: underline;
       letter-spacing: 2mm;
       font-family: comic sans ms; }
</STYLE>
</HEAD>
<BODY>
<H1>My First CSS Web Page</H1>
<BR><BR>
<H2>Learning With Draac.Com</H2>
</BODY>
</HTML>

check Click To View Our Page Here

Note: Not All Text Attributes Are Supported by MSNTV

You can add as many headings as you would like. There are many different attributes to use with text. Please look over the Reference Sheet for a minute before moving on. I think you will understand the attributes on this sheet and how to use them. This is just one way to add text to your CSS web page. We will explore other ways next in this course.

Back Back------Next Next

ValueWeb Banner
Draac.Com Is Hosted By ValueWeb

Register UK domain names at Domain Names UK

| Advertise | Link To Us | Status/Updates | Privacy Statement |
| Copyright © 1999-2003 Draac.Com © All Rights Reserved. |