![]() The font-family name specified inside of the declaration is used for setting the font-family property to the elements in the same way as web safe fonts. to move up and out of the CSS folder first, then fonts/ to move into the folder, then the font file name. So let's say you have a folder called fonts to organize all of your font files, styles.css is now your starting point, which is also located inside of a folder, css. Since the declaration is made in the CSS file, the file path must be relative to the location of the CSS file. When we linked to our CSS file, the file path was relative to the location of the HTML file. Let's take a moment to review relative paths. It can be a relative or absolute path depending where your font files are being downloaded from. The source property uses a function URL value to include the path to the font files. You could give it any name, but it's convention to use the same name as the typeface. Next, in this context, the font-family property is used to define the name of the font-family. ![]() ![]() Make sure to use the keyword as shown, to start the declaration. ![]() First, it must be declared in your style sheet before you can use your font. The syntax looks similar to the CSS declarations we've used so far, but it's a little different. Font files can be downloaded along with the website, just like any other resource such as images. Web Fonts are a CSS feature that can be used to expand your typeface options.
0 Comments
Leave a Reply. |