Computer scienceFrontendCSSBasic propertiesWorking with Text

Using Fonts

File

Report a typo

In this task, you have to connect the file 'my-font.otf' to your CSS. That's a file containing a font with a weight of 400, normal style, and normal stretch. Give it a name you like and don't forget to assign the font to body!

Unfortunately, you won't see the resulting changes after you connect the font. But this is still good practice (and a nice quote from Max Kanat-Alexander).

Write HTML and CSS code
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Best font ever!</title>
</head>
<body>
<div class="container">
<p>Some of the best programming is done on paper, really. Putting it into the computer is just a minor detail.</p>
<p class="small">― Max Kanat-Alexander</p>
</div>
</body>
</html>

Completed 0 of 2
Font created
Font assigned to body
___

Create a free account to access the full topic