August 23, 2000 - Changing the Font Family on the Fly
August 23, 2000 Changing the Font Family on the Fly Tips: August 2000
Yehuda Shiran, Ph.D.
|
Mouse over this paragraph and see how the font family changes to Courier. Mouse out and see it changing to Arial. This is a good way to emphasize the paragraph currently being read. See how the browser reflows the page as if this paragraph was originally written with the current font family. Here is the HTML code that implements the above paragraph: Here is the HTML code that implements the above paragraph:
<SPAN STYLE="color:purple" onMouseOver="this.style.fontFamily = 'Courier'"
onMouseOut="this.style.fontFamily = 'Arial'">
Mouse over this paragraph and see how the font family
changes to size Courier. Mouse out and see it changing
to Arial. This is a good way to emphasize the paragraph
currently being read. See how the browser reflows the page
as if this paragraph was originally written with the current
font family.
</SPAN>
Learn more about the subject in Column 66, Dynamic Styles.