How to add font family into html from external sources | SoloLearn: Learn to code for FREE!

0

How to add font family into html from external sources

1/23/2021 4:55:12 PM

Thirt13n

1 Answer

New Answer

+1

If the font is CSS file (for example, Google Fonts (https://www.w3schools.com/css/css_font_google.asp)), use <link rel = "stylesheet" href = "insert_CSS_font_link_here" /> (preferably in the <head> tag for the font to load before the page's visible content). For TTF, WOFF, EOT, SVG (better to use them all for browser compatibility use CSS's @font-face rule (see https://stackoverflow.com/questions/24990554/how-to-include-a-font-ttf-using-css, https://www.w3schools.com/css/css3_fonts.asp).