The STYLE Element & CSS Selectors (cont.) - The Human Factor | WebReference

The STYLE Element & CSS Selectors (cont.) - The Human Factor

Front Page12345678910

Now let's use the STYLE element to insert our stylesheet into our document:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN"
"https://www.w3.org/TR/REC-html40/strict.dtd">
<HTML>
<HEAD>
<TITLE>Acme Computer Corp.: Who We Are</TITLE>
<STYLE TYPE="text/css" MEDIA="screen">
BODY {
 background-color: #E0DD06;
 color: #027002;
}
H1 {
 text-align: right;
 font: bold italic 150% sans-serif;
 color: red;
}
P {
 text-align: justify;
 margin-left: 2cm;
}
</STYLE>
</HEAD>
<BODY>
<H1>Acme Computer Corp.</H1>
<P>Acme Computer Corporation is a
technology-based company that seeks to offer 
its customers the latest in technological innovation. 
Our products are created using the latest 
breakthroughs in computers and are designed
by a team of top-notch experts.</P>
<H1>Global Presence, Global Thinking</H1>
<P>We are based in Acmetown, USA, and have
offices in most major cities around the world. 
Our goal is to have a global approach to the 
future of computing. Have a look at our product 
catalog for some examples of our innovative
approach.</P>
<HR>
<ADDRESS>
Comments to:
<A HREF="mailto:[email protected]">Web Master</A>, 
Acme Computer Corp., One Acme Road, AcmeTown, USA.
</ADDRESS>
</BODY>
</HTML>

Have a look at what we just did.

Indeed, the effect is staggering. Our sterile, boring document has been transformed into a presentable Web page that attracts the attention of your readers, which in Acme's case is customers. That is, if you ignore my terrible taste for colors. But you get the picture.

Front Page12345678910

https://www.internet.com

Produced by Stephanos Piperoglou

All Rights Reserved. Legal Notices.

URL: https://www.webreference.com/html/tutorial5/5.html
Created: August 20, 1998
Revised: August 20, 1998