microsoft.com Home   All Products  |   Support  |   Search  |   microsoft.com Home  
Microsoft

Microsoft Typography | Typography on the Web | Specifying fonts... | FONT FACE and tables next


FONT FACE and tables

FONT FACE works almost the same way in both Microsoft® Internet Explorer and the Netscape browser, except in one important respect. In Internet Explorer a font specified using FONT FACE is used to render all subsequent text until a </FONT> tag is encountered. However in Netscape 3 any subsequent text enclosed in a TABLE reverts to the default font. The way each browser copes with the following code is shown in figure 1.

<FONT FACE="Comic Sans MS">
text outside the table
 <TABLE BORDER=0>
 <TD>text inside the table</TD>
 </TABLE>
</FONT>


FONT FACE and tables

Figure 1.


Other attributes such as COLOR and SIZE work in the same way in both browsers. The following code produces the effects seen in figure 2.

<FONT COLOR=#FFFFFF SIZE=5>
text outside the table
 <TABLE BORDER=0>
 <TD>text inside the table</TD>
 </TABLE>
</FONT>


FONT FACE and tables

Figure 2.


You might have thought that BASEFONT would solve this problem. Unfortunately it doesn't. The following code produces the results shown in figure 3.

<BASEFONT FACE="Comic Sans MS" 
COLOR=#FFFFFF SIZE=5 > 
text outside the table
 <TABLE BORDER=0>
 <TD>text inside the table</TD>
 </TABLE>
</FONT>


FONT FACE and tables

Figure 3.


As can be seen from figure 3 only the SIZE attribute for BASEFONT is supported by Netscape, and even this isn't used inside the table. In Internet Explorer BASEFONT seems to support all three FONT attributes; FACE, SIZE and COLOR. However only FACE has been carried across.


The solution

Currently FONT attributes need to be included within every cell of a table, in order to ensure that they are used to render text displayed in Netscape as well as Microsoft Internet Explorer. The fact that FACE attributes are picked up inside tables using Internet Explorer is almost certainly a feature which should not be relied on.



this page was last updated 30 June 1997
© 1997 Microsoft Corporation. All rights reserved. Terms of use.
comments to the MST group: how to contact us

 

Microsoft Typography | Typography on the Web | Specifying fonts... | FONT FACE and tables next