![]() |
|
<style>
![]() |
![]() |
||||||||||||||||||||||||||||||||||||||||||
Note:This has been implemented and tested in Microsoft IE. It will not work in Netscape (3.0 & 4.0). I fully expect that Netscape in version 5.0 will undertake stylesheets. When that happens, perhaps the standards will be formed.
HTML 3 introduced initial support for stylesheets. These are supplementary documents that contain style formatting instructions that can be applied to an HTML document. The idea behind stylesheets is that this display formatting information can be stored as a separate piece of information, called a stylesheet and that the stylesheet can then be applied to a document while it is being formatted for display.
Microsoft introduced styles with the MSIE3.0b1. (See also <P style=""> and <LINK REL="style" TYPE="text/css">).
The opening tag must appear between the opening <HTML> and <BODY> tags. Microsoft does not specify where it should appear relative to <HEAD> or <TITLE>. They imply that any existing tag is able to be modified by the use of style descriptions. The following is the example that they provide:
<HTML>
<STYLE>
BODY {background: white; color: black}
H1 {font: 14pt Arial bold}
P {font: 10pt Arial; text-indent: 0.5in}
A {text-decoration: none; color: blue}
</STYLE>
<BODY>
<H1>This is a headline! In 14-point Arial bold!</H1>
<P>Yes, folks, here it is in black and white this page is actually using style sheets. Oh, by the way, <A HREF="http://www.microsoft.com>this" is a link,</A> but it's not underlined, because we set text-decoration for links to none.</P>
</BODY>
</HTML>
They intimate that any attribute to an existing tag can be used as arguments inside braces - { and }. They also state that multiple arguments need only be separated by semicolons. i.e.:
Note that to assign more than one kind of style information at once, you simply separate the styles with semicolons. For example, to set the font of an entire HTML page to 10-point Times font, the colors to black on white, and both left and right margins to one inch, place the following before the <BODY> tag:
<STYLE>
BODY {font: 10pt Times; color: black; background: white; margin-left: 1in; margin-right: 1in}
</STYLE>
To see the attributes and arguments applicable to <BODY> I invite you to examine the <p> tag. Click here and go down the page to the style="" attribute.
MSIE 3.0 DTD specified two attributes "type" and "title" but gave no explanation. Given the direction of Cascading Style Sheets to date, it may be wise to ignore them.