Developing Webs logo
Google
Web DW-Main DW-Photoshop
Visit the message board for solutions or post a question Check out the Classes offered for free at Developing Webs Voice Chat submit a tutorial, resources, article, font for publication consideration and earn a one way link back to your site Get more specifics about the Developing Webs Voice chat room and its room members View the current news at Developing Webs alternative sites which are resources for your d3evelopment needs Join Developing Webs Chat Link to us on your web page to help support this resource! Check out Developing Webs At yahoo groups! Developing Webs Home Adobe Photoshop Tutorials Macromedia Flash Tutorials Jasc Paint Shop Pro Tutorials Adobe Illustrator Animation basics Some Basic PHP tutorials Perl Tutorials HTML Tutorials Cascading Style Sheets javascript Front Page Tutorials Macromedia Dream Weaver Tutorials dreamweaver Publishing your site, FTP, ChMod, Promotions
RSS Newsfeed
for your site
DW News
Calendar
DW Forum
Right click on button and copy shortcut

Add to My Yahoo!

Reminder
Remember to book mark this site!



Request a Tutorial

4 Setting Up an External Sheet 4

Heading Tags

1  2  3  4  5  6  7  8  9  10

Heading tags are often set up to host styles to unify a site. While a site may have all the text in black, if all the titles on the site were say blue or red, there would be unity in the page look by text size and color.

  • open and save this doc, myHTML to your hard drive in the directory that your css sheet is in.

1. Our CSS sheet at this point should look like this:

Open  your my.html document that you downloaded above.  Text has been added with the following tags: heading 2, heading 3, heading 4, and paragraphs for a later lesson.

2. To set up a style for the heading tags we need to specify the heading we want to change. To set up the style for the heading2 tag,  Type in the following:

h2{

}

3. The h2 is called an element, just like the body in the previous styles.  Each element responds to numerous styles. Lets add color. To add color, type in the word colr followed be the colon. Specify the color as #hex or the accepted html name. End the command with a semicolon ;.

H2 {
     color: red;
}

Save your style sheet and refresh your my.html page. Try a few other colors including gray, blue, navy, yellow, lime.

4. Normal H2 tag has a set font size similar to about an 18 pt bold. Let's change it to 40 pt.

H2 {
color: lime;
font-size: 40pt;
}

Save and refresh your browser. Font size can be in pixel too. Change the pt to px, save and refresh! Try 60 px.

5. Text Alignment: To set the alignment of your h2 tag to something other then default, you use the
text-align: style. This can be set to center, left, right, or justify. Set it to center.

 H2 {
color: lime;
font-size: 60 px;
text-align: center;
}

6. Set the font family style by including font-family: within the h2 element tags on the CSS sheet. This can simply be serif, sans-serif, cursive, fantasy, or monospace, or you can select the exact font such as Arial.

font-family: fantasy;
font-family: Times New Roman;
font-family: Verdana;
font-family: Comic Sans MS;
font-family: Arial;

 

Try a few different font-family settings and leave it on sans-serif..
You can set the background color and background-image much like the body styles. Try these two:

background-color: black;
background-image: url(http://www.developingwebs.net/animatedmatrixtexture.gif);

7. To set up a style for the <h3> tag on your HTML document, type in the element, h3, as a new section on your CSS sheet.

H3 {
color: lime;
}

Use the information above to color, align, size, etc, all the h3 tags. Then try the H4 tags.

Once your done with this, It is time to move on to the paragraph tags in the next section.



"Building The Web Into a Nicer Place -- One Site At A Time"
Developing Webs Group Copyright © 2001-2025 All Rights Reserved
Privacy and Legal