You are on page 1of 2

CSS

External Style Sheet

<html>
<head>
<link type="text/css" rel="stylesheet" href="paragraph.css">
</head>

<body>
<h1>Headline Text </h1>

<p>This is body</p>

</body>
</html>

File
p
{
color: blue;
text-align:right;
font-family: courier;
}

USING CLASS
<style>
p.className {color:black; }
p.bodytext {color: red; }
</style>

<p class="bodytext">
This one is red. </p>

USING ID
<style>
#highlight {color:yellow; font-style: italic; }
</style>

<p id="highlight"> highlighted text </p>

UNIVERSAL SELECTOR
Instead of
body, p, table, h1, h2, h3, h4, h5, h6, {font-weight: bold;}
Use
* {font-weight: bold;}
TO OVERRIDE PRECEDENCE USE !IMPORTANT
p { color: blue; text-align: center; font-family: arial!Important; font-size:18.0pt!Important }

You might also like