Which two properties must you specify in a CSS3 @font-face rule?

Advance your skills with the uCertify CIW – Advanced HTML5 and CSS3 Specialist Test. Study with flashcards and multiple-choice questions, complete with hints and explanations to enhance your learning. Prepare effectively and ace your exam!

Multiple Choice

Which two properties must you specify in a CSS3 @font-face rule?

Explanation:
Defining a custom font with @font-face hinges on giving the font a name and providing its data. The font-family descriptor assigns the name you’ll use in your CSS to refer to this font, and the src descriptor tells the browser where to load the font file from (the actual font data). Without a font-family, there’s no handle to apply the font anywhere in your styles; without src, there’s no font data for the browser to download and render. The other descriptors, like font-weight and font-style, describe variations of a font-family and are optional—you’d add them in separate @font-face blocks to supply bold, italic, or other styles. So the essential pair is font-family and src.

Defining a custom font with @font-face hinges on giving the font a name and providing its data. The font-family descriptor assigns the name you’ll use in your CSS to refer to this font, and the src descriptor tells the browser where to load the font file from (the actual font data). Without a font-family, there’s no handle to apply the font anywhere in your styles; without src, there’s no font data for the browser to download and render. The other descriptors, like font-weight and font-style, describe variations of a font-family and are optional—you’d add them in separate @font-face blocks to supply bold, italic, or other styles. So the essential pair is font-family and src.

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy