In this post, short examples are shown for how to use two popular fonts using the HTML< link> tag.
Awesome fonts
<!DOCTYPE>
<html>
<head></head>
<body>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free/css/all.min.css">
<i class="fas fa-robot"> Robot </i>
<br>
<i class="fas fa-laptop">Laptop  </i>
<div id="output"></div>
<script>
</script>
</body>
</html>
The output is the following, where the boxes are where the fontawesome icons and its unicode version are printed.
Robot
Laptop
Google fonts
<!DOCTYPE>
<html>
<head></head>
<body>
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Tangerine">
<h3 id="h3_text">Using Google fonts!</h3>
<style>
#h3_text {font-family: "Tangerine"; font-size: 35px;}
</style>
<script>
</script>
</body>
</html>
Good Luck and Happy Practicing! 👋
💻 GitHub | 🌷 Practicing Datscy @ Dev.to | 🌳 Practicing Datscy @ Medium
Top comments (0)