Set the Font Family of Elements

Set the Font Family of Elements
0

#1

Tell us what’s happening:
I cant change my h1 elements font family. i add it to my css but nada. also are there some fonts i can add and others i cannot? i know this is begginners stuff but meh
below is my link to codepen.

Your code so far


#2

I made some modifications to your code and now it works

Remove the following HTML:

<link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.1/css/bootstrap.min.css"/>
<link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css"/>

Instead, place this in your pen’s settings:

After that, remove the following JavaScript

document.getElementsByTagName("h1")[0].style.fontSize = "80px";

Instead, use the following CSS:

h1 {
  font-size: 80px;
}

If you follow all these steps, you will be able to change the font-family.

Note: If a certain font-family isn’t installed on your computer, it won’t use that. Instead, it will use one that is installed. If you really want to use a specific font-family, take a look at e.g. Google Fonts: https://developers.google.com/fonts/docs/getting_started