HOTSPOT
You are implementing an HTML page that uses a custom sans-serif font. The CSS statement for the page is as
follows.
Some users report that text is displayed in the default font for the browser.
You need to modify the CSS statement to ensure that the content is displayed with the custom font.
What should you do? (To answer, select the appropriate options from the drop-down lists in the answer area.)
Hot Area:
Explanation:
Using The Font You Want
In the CSS3 @font-face rule you must first define a name for the font (e.g. myFirstFont), and then point to the
font file.
To use the font for an HTML element, refer to the name of the font (myFirstFont) through the font-family
property:
Example
@font-face {
font-family: myFirstFont;
src: url(sansation_light.woff);
}
div {
font-family: myFirstFont;
}
Note:
* CSS3 Web Fonts – The @font-face Rule
Web fonts allow Web designers to use fonts that are not installed on the user’s computer.
When you have found/bought the font you wish to use, just include the font file on your web server, and it will be
automatically downloaded to the user when needed.
Your “own” fonts are defined within the CSS3 @font-face rule.* TrueType Fonts (TTF)
TrueType is a font standard developed in the late 1980s, by Apple and Microsoft. TrueType is the most
common font format for both the Mac OS and Microsoft Windows operating systems.
CSS3 Web Fonts