I have been trying for some time to apply the Open Sans source in a project with HTML, CSS and the framework Bootstrap .
Link to import the source:
<link href="https://fonts.googleapis.com/css?family=Open+Sans" rel="stylesheet">
The problem is that it only works with CSS3 using it in the form Internal Style sheet .
Code:
-
This way it works (adding the style element to HTML):
<style type="text/css"> h1 { font-family: Open Sans; } </style>
-
In this other way (in the .css file) no:
h1 { font-family: Open Sans; }
I have tried the different imports:
<style>
@import url('https://fonts.googleapis.com/css?family=Open+Sans');
</style>
According to what I have found, I have also tried to remove the http :, with @ font-face but it still does not work. Any ideas?
Head of HTML:
<head>
<link href='http://fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,600italic,700italic,800italic,400,300,600,700,800' rel='stylesheet' type='text/css'>
<meta charset="UTF-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Portfolio Webpage</title>
<script src="https://use.fontawesome.com/fe361c97c5.js"></script>
<link rel="stylesheet" href="style.css"/>
<link href="C:\DESARROLLO WEB\FrontEnd\BOOTSTRAP\bootstrap-3.3.7-
dist\css\bootstrap.min.css" rel="stylesheet"/>
<script src="http://code.jquery.com/jquery-1.11.1.min.js"></script>
<script src="http://netdna.bootstrapcdn.com/bootstrap/3.0.0/js/bootstrap.min.js">
</script>
</head>