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

Prepare for the uCertify CIW Advanced HTML5 and CSS3 Specialist Exam. Dive into essential topics with flashcards and multiple-choice questions. Enhance your understanding with hints and explanations for each question. Pass your exam confidently!

Multiple Choice

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

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