Things That Might Change -- Logical vs. Physical Styles

Please note that the HTML Level 4 examples use elements from the Cascading Style Sheet (CSS2) specification, which will not be rendered correctly on browsers which do not fully support CSS2. Among these browsers are Microsoft Internet Explorer version 3.x and earlier, and Netscape Navigator version 3.x and earlier. Internet Explorer 3.0 and above is supposed to support the earlier version of cascading style sheets (CSS1), and valid CSS1 style sheets are supposed to be compliant with the CSS2 specification, but I have noticed that there are some differences which are not supported by IE 3.0. These differences are supported in the 4.x versions of IE, however.

The CSS2 examples given here use the <SPAN> tag, which allows the author to insert style information in a line of text without breaking that line. There are a variety of other ways of inserting styles into a document which include grouping font characteristics within a style, and using a <LINK> tag in the head section of the document which specifies the location of a central style sheet which can be used by multiple documents, as has been done with this web site. These styles may or may not display correctly depending on which browser you're using to view these pages. For these examples I've tried to keep the code as simple as possible.

HTML Level 0 & 1

HTML Level 2 & 3

HTML Level 4 (CSS2)

Example Text
 
<STRONG>Example Text</STRONG>
Example Text
 
<B>Example Text</B>
Example Text
 
<SPAN STYLE="font-weight: bold">Example Text</SPAN>
Example Text
 
<EM>Example Text</EM>
Example Text
 
<I>Example Text</I>
Example Text

<SPAN STYLE="font-style: italic">Example Text</SPAN>

Example Text

<P ALIGN="center">Example Text</P>

Note: This example is only valid in Level 1

Example Text

<CENTER>Example Text</CENTER>
Example Text
<SPAN STYLE="text-align: center">Example Text</SPAN>

It is not possible to control the appearance
of a web page to this degree using
Level 0 or Level 1 HTML

Example Text
 
<FONT FACE="Courier" SIZE="+2" COLOR="#8800FF"<Example Text</FONT>

Note: This example is only valid in Level 3

Example Text
 
<SPAN STYLE="font-family: courier; font-size: 14pt; color: #8800FF">Example Text</SPAN>
 

It is not possible to control the appearance
of a web page to this degree using
Level 2 or Level 3 HTML

Many characteristics which define the appearance of a document can be defined using Cascading Style Sheets. Among these are font face, size, weight, style, decoration and color, margins, text indentation and alignment and background colours and textures. The style sheet which controls this web site can be seen here. For complete details on how to use Cascading Style Sheets, please refer to the CSS2 Technical Specification.