The forum of the forums
Would you like to react to this message? Create an account in a few clicks or log in to continue.

what the best way to add a custom font in HTML page

2 posters

Go down

Solved what the best way to add a custom font in HTML page

Post by Michael_vx July 27th 2015, 9:12 am

what the best way to add a custom font in HTML page to work even if the user dose not have the font installed on his OS
and to force the font i want to be in the page
with any way
thanks
Hello


Last edited by Michael_vx on July 27th 2015, 10:52 am; edited 1 time in total (Reason for editing : Solved)
Michael_vx
Michael_vx
Forumember

Male Posts : 664
Reputation : 29
Language : Arabic and some English
Location : Egypt

Back to top Go down

Solved Re: what the best way to add a custom font in HTML page

Post by Ange Tuteur July 27th 2015, 9:56 am

You can usually import a font with CSS, such as Font Awesome or Google Fonts for example. The domain the fonts are hosted on however, needs to be cross domain. Otherwise, the font cannot be imported to your forum from another website.
Ange Tuteur
Ange Tuteur
Forumaster

Male Posts : 13246
Reputation : 3000
Language : English & 日本語
Location : Pennsylvania

https://fmdesign.forumotion.com

Back to top Go down

Solved Re: what the best way to add a custom font in HTML page

Post by Michael_vx July 27th 2015, 9:58 am

i want to custom a HTML page
and do you mind Explain a bit more
Michael_vx
Michael_vx
Forumember

Male Posts : 664
Reputation : 29
Language : Arabic and some English
Location : Egypt

Back to top Go down

Solved Re: what the best way to add a custom font in HTML page

Post by Ange Tuteur July 27th 2015, 10:08 am

Using google fonts for example, click "quick use" and it'll take you to a page with three codes. Since it's an HTML page you're using grab the standard link code and paste it in your head section.

Example :
Code:
<!DOCTYPE html>
<html>
  <head>
    <title>Page Title</title>
    <meta charset="UTF-8"/>
    <link href='http://fonts.googleapis.com/css?family=Open+Sans' rel='stylesheet' type='text/css'/>
  </head>

  <body>

  </body>
</html>

Then you can use the font in a inline <style> tag.
Code:
<style type="text/css">
body {
  font-family:'Open Sans', sans-serif;
}
</style>
Ange Tuteur
Ange Tuteur
Forumaster

Male Posts : 13246
Reputation : 3000
Language : English & 日本語
Location : Pennsylvania

https://fmdesign.forumotion.com

Back to top Go down

Solved Re: what the best way to add a custom font in HTML page

Post by Michael_vx July 27th 2015, 10:34 am

i understand now Smile
thanks a lot
thanks words are not Enough
i still have much a lot to learn
thank you again
this topic is solved
Michael_vx
Michael_vx
Forumember

Male Posts : 664
Reputation : 29
Language : Arabic and some English
Location : Egypt

Back to top Go down

Solved Re: what the best way to add a custom font in HTML page

Post by Ange Tuteur July 27th 2015, 11:10 am

You're welcome ^^

Topic locked

Google fonts would be the best font serving site that I know of, but I'm sure there may be more if you look. Have a great day ! Smile
Ange Tuteur
Ange Tuteur
Forumaster

Male Posts : 13246
Reputation : 3000
Language : English & 日本語
Location : Pennsylvania

https://fmdesign.forumotion.com

Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum