Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Source sans pro font in html [duplicate]

I would like to use googles "source sans pro" font in the font-family attribute in CSS, in my HTML site. I use Bootstrap as a front end framework.

https://www.google.com/fonts/specimen/Source+Sans+Pro

How can I achieve that? Do I have to include the file into my html site?

Thank you for any help!

like image 462
Steve Avatar asked Feb 04 '16 14:02

Steve


2 Answers

Add this string in head section of your site:

<link href='https://fonts.googleapis.com/css?family=Source+Sans+Pro' rel='stylesheet' type='text/css'>

Then use this font:

h1 {
  font-family: 'Source Sans Pro', sans-serif;
}
like image 163
Igor Ivancha Avatar answered Oct 01 '22 13:10

Igor Ivancha


The instructions are given on the link at the top of the page you show. https://www.google.com/fonts#UsePlace:use/Collection:Source+Sans+Pro

You include this in the head of your page:

<link href='https://fonts.googleapis.com/css?family=Source+Sans+Pro' rel='stylesheet' type='text/css'>

and specify the font family in your CSS.

element {
    font-family: "Source Sans Pro"
]
like image 44
Rob Avatar answered Oct 01 '22 13:10

Rob