<p>here’s some <span style=”font-weight: bold”>bold text </span>.</p>
<p>here’s some <span style=”font-weight: bolder”>bolder text </span>.</p>
<p>here’s some <span style=”font-weight: lighter”>lighter text </span>.</p>
<p>here’s some <span style=”font-weight: 700”>bold text </span>.</p>
You can also set the typeface for text using the font-family property. You can also set the specific font for text, but I’m not going to discuss that unit later today. In the meantime, let’s look at how you c a set the font to a member of a particular font family. The specific font will be taken from the user’s preferences. The property to modify is font-family. The want to specify that a Monospac e font should be used with CSS instead of the <tt> tag, you would use the following code:
INPUT
<p><span style=”font-family: monospace”> this is moonscapes text. </span></p>
Not let’s look at one capability that’s not available using regular HTML tags. Using the font-variant property, you can have your text endured so that lowercase letters are replaced with larger capital letters. The two values available are normal and small-caps. Here’s an example:
INPUT
<p><span style=’font-variant: small-caps’> this text uses small caps.</span></p>
The browser window in figure 6.3 contains some text that uses the font-variant property as well as al the other properties described in this section.
No comments:
Post a Comment