Paragraphs tags are used in a way similar to heading tags. They can unify
a site. A paragraph tag often is used to determine indenting, spacing and
other factors that will make your site stand out as unique.
- 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 something like below and the
resulting page like the snapshot below that.

Open your my3.html document that you downloaded above.
Text has been added with the Paragraph tags as well as heading
tags.. 2. To set up a
style for the paragraph tags we need to specify the heading we want
to change. To set up the style for the paragraph tag, Type in
the following:
p{ }
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 color followed be the colon. Specify the color as
#hex or the accepted html name. End the command with a semicolon ;.
p{
color: red;
}
Save your style sheet and refresh your my4.html page. Try a few other
colors including gray, blue, navy, yellow, lime. 4. Normal p tag has a
space above and below it. Let's change the space it occupies by setting a
paragraph height.
P {
color: red;
height: 300px;
}
Save and refresh your browser. Margins can be set so that each
paragraph indents. Try 60 px.
P {
color: red;
height: 300px;
margin-left: 60 px;
}
6. Set the font family style, font size and so forth! Your on your way!
Once your done with this, Try using other tags to achieve results. It
is time to move on to the next section. |