<html>
<head>
<title>Abakada CSS Demo: font-family Property</title>
<link rel="stylesheet" href="/shared/netdemos.css">
</head>
<body>
<!-- #include virtual="~/shared/top.inc" -->
<div class="header"><h2>Abakada CSS Demo: font-family Property</h2></div>
<hr size=1 width=92%>
<center>
<h5>This example shows the effects of applying different typeface values for the CSS <b>font-family</b> style attribute.</h5>
<p id="msg">Select a font in the options below to see how the style is applied, and note the resulting CSS syntax for the style declaration. </p>
<h5 id="theSyntax">Syntax { font-family: "Arial, sans-serif" }</h5>
<p>Select font family:
<select name="opts" onchange="chgProp ( this.value )">
<option value="arial">Arial
<option value="book">Book Antiqua
<option value="comic">Comic Sans
<option value="times">Times
<option value="verd">Verdana
<option value="serif">Serif
<option value="sans">Sans-serif
</select></p>
<p><b>NOTE</b>: Including the generic families "<b>Serif</b>" or "<b>Sans-serif</b>" after a specified font family is optional, though recommended. They are used to instruct the browser to use a generic alternative, in case the specified font is not installed on the client. </p>
</center>
<script language="JavaScript">
<!--
function chgProp ( val ) {
if ( val == "arial" ) fnt = "Arial, sans-serif";
if ( val == "book" ) fnt = "Book Antiqua, serif";
if ( val == "comic" ) fnt = "Comic Sans MS, sans-serif";
if ( val == "times" ) fnt = "Times, serif";
if ( val == "verd" ) fnt = "Verdana, sans-serif";
if ( val == "serif" ) fnt = "Serif";
if ( val == "sans" ) fnt = "Sans-serif";
msg.style.fontFamily = fnt;
txt = "Syntax { font-family: \"" + fnt + "\" }"
theSyntax.innerText = txt;
}
//-->
</script>
<hr size=1 width=92%>
<!-- #include virtual="~/shared/viewsrc.inc" -->
</body>
</html>