Free Essay

Covaders

In:

Submitted By Botz
Words 626
Pages 3
<!DOCTYPE html>
<html>
<head>
<style type="text/css"> body { background-color:#d0e4fe; } h1 { color:orange; text-align:center;
}
p
{
font-family:"Times New Roman"; font-size:20px; }
</style>
</head>

<body>

<h1>CSS example!</h1>
<p>This is a paragraph.</p>

</body></html>

<!DOCTYPE html>
<html>
<head>
<style type="text/css">
#para1
{ text-align:center; color:red;
}
</style>
</head>

<body>
<p id="para1">Hello World!</p>
<p>This paragraph is not affected by the style.</p>
</body></html>

<!DOCTYPE html>
<html>
<head>
<style type="text/css"> body { background-color:#b0c4de; }
</style>
</head>

<body>

<h1>My CSS web page!</h1>
<p>Hello world! This is a W3Schools.com example.</p>

</body>
</html>

<!DOCTYPE html>
<html>
<head>
<style type="text/css"> body {color:red;} h1 {color:#00ff00;}
p.ex {color:rgb(0,0,255);}
</style>
</head>

<body>
<h1>This is heading 1</h1>
<p>This is an ordinary paragraph. Notice that this text is red. The default text-color for a page is defined in the body selector.</p>
<p class="ex">This is a paragraph with class="ex". This text is blue.</p>
</body>
</html>

<!DOCTYPE html>
<html>
<head>
<style type="text/css">
p.serif{font-family:"Times New Roman",Times,serif;}
p.sansserif{font-family:Arial,Helvetica,sans-serif;}
</style>
</head>

<body>
<h1>CSS font-family</h1>
<p class="serif">This is a paragraph, shown in the Times New Roman font.</p>
<p class="sansserif">This is a paragraph, shown in the Arial font.</p>

</body></html>

<!DOCTYPE html>
<html>
<head>
<style type="text/css"> p { background-color:yellow; }
p.margin
{ margin-top:100px; margin-bottom:100px; margin-right:50px; margin-left:50px;
}
</style>
</head>

<body>
<p>This is a paragraph with no specified margins.</p>
<p class="margin">This is a paragraph with specified margins.</p>
</body></html>

<!DOCTYPE html>
<html>
<head>
<style type="text/css"> body {background-image:url('paper.gif');}
</style>
</head>

<body>
<h1>Hello World!</h1>
</body>

</html>

<!DOCTYPE html>
<html>
<head>

<style type="text/css"> body { background-image:url('img_tree.png'); background-repeat:no-repeat; background-position:right top; margin-right:200px; }
</style>

</head>

<body>
<h1>Hello World!</h1>
<p>W3Schools background no-repeat, set postion example.</p>
<p>Now the background image is only shown once, and positioned away from the text.</p>
<p>In this example we have also added a margin on the right side, so the background image will never disturb the text.</p>
</body>

</html>

Similar Documents