Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialNour El-din El-helw
8,241 Pointsformat() function
What is the use of format() function. I looked it up on MDN but still dun get it.
1 Answer
Steven Parker
231,248 PointsThe "format()" function specifies what format the font resource uses to help the browser select one it can handle. The argument string must be one of the available types "woff", "woff2", "truetype", "opentype", "embedded-opentype", and "svg".
Nour El-din El-helw
8,241 PointsNour El-din El-helw
8,241 Pointsso in this code @font-face { font-family: "whatever"; src: url(location) format(the format) } does the url() function just tell the browser where to find the fomat to download it on the user's pc and the te format appears by the format() wat i mean is wat i the use of url() function
Steven Parker
231,248 PointsSteven Parker
231,248 PointsThe "url()" is where to get the font, and "formt()" is what kind it is.
Nour El-din El-helw
8,241 PointsNour El-din El-helw
8,241 PointsOh now i get thx m8