Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

My Montserrat font is not showing the correct font-style

Tags:

html

css

fonts

My Montserrat font is not showing the correct style. It is just normal. But if I add the style in the link it is going to work but I don't want the same style for everything. Like this:

 <link href="https://fonts.googleapis.com/css?family=Montserrat|Ubuntu" rel="stylesheet"> 

This is the link and I want my h1 to be styled in Montserrat Black so I added:

h1 {
 font-family: "Montserrat-black";
}

But I am not seeing the effect . and if I add it here like this:

<link href="https://fonts.googleapis.com/css?family=Montserrat:black|Ubuntu" rel="stylesheet">

The style black is going to be all over the page and I want it in only h1 so please help me out how do I go about it.

like image 241
Muhammad Najib Avatar asked Feb 01 '19 20:02

Muhammad Najib


People also ask

What standard font is similar to Montserrat?

3. Montserrat. The fantastic Montserrat is another great and similar font to Gotham. While there are some differences, Montserrat and Gotham are very much cut of the same cloth.

How do I get Montserrat font in Adobe?

Montserrat is available via an open source license. You're free to use it with your Adobe Fonts account just as you would any other font in the Adobe Fonts library.


1 Answers

Customize your font in google fonts and use font-weight: 300 | 500 | 700 | 900:

enter image description here

h1 {
  font-family: 'Montserrat', sans-serif;
  font-weight: 900; /* black */
}
  
  <link href="https://fonts.googleapis.com/css?family=Montserrat:400,500,700,900|Ubuntu:400,500,700" rel="stylesheet">
  
  <h1>
    Lorem ipsum dolor sit amet.
  </h1>
like image 119
HamSter Avatar answered Oct 20 '22 06:10

HamSter