Learn CSS: Typography


#1

Good day guys , im stuck on Exercise 18/19 of Learn CSS: Typography.
I would appreciate your help alot.

Here is the link : https://www.codecademy.com/courses/learn-css-typography/lessons/css-typography/exercises/font-face-iii?action=resume_content_item&course_redirect=learn-css

Instructions
1.In the fonts/ directory, you’ll notice that we have added several local font files.

Let’s change the typography of the banner, using local font files. If you open up the fonts/ directory using the file navigator in the code editor, you’ll notice that we have added local font files Glegoo-Regular.ttf and Glegoo-Bold.ttf.

At the top of style.css, create a selector using the @font-face property and give it the font family Glegoo.

HTML
@font-face{
font-family: ‘Glegoo’;
src:local(‘Glegoo-Regular’), local(‘Glegoo-Bold’),
url(…/fonts/Glegoo-Regular.ttf)
format(‘truetype’);

}

Question1: Is it mandatory to have single quotes for the font-family Glegoo?

Question2: Why aren’t double quotations mandatory for the typefaces Glegoo-Regular and Glegoo-Bold under src?

According to Exercise 2/19 however ,it was shown that it was not necessary to have any quotations for a typeface with one word , only for typefaces with more than one word is necessary for double quotations


Instructions
Within the @font-face rule, add a src attribute with the relative path of the file Glegoo-Regular.ttf and a format of truetype. Make sure to include this path in the url() parentheses.

image

Question3: Why are there 2 periods instead of 1 period? From what i know from Learn HTML: Elements and Structure, only 1 period is required to access a local file.


#2
  1. Fonts that have spaces or - should be quoted, if its a double or single quote it doesn’t matter, to what I understand the rule of CSS says to quote it but if you don’t it will still work, sometimes fonts that don’t contain spaces or a - are quoted too. (as far as I know)

  2. Has been answered above ^

  3. Two periods takes you a directory back and access the file in that directory.

    Example: I am currently in: C:\Users\zainab\Desktop\eBooks
    I am in eBooks but I want to access a file in Desktop I’ll need to go a file back to access that file that’s in desktop, adding two periods takes you a folder back and looks in that folder.

Hope it makes sense and you understand :slight_smile:


#3

Awesome,Thank you !:slight_smile:


#4