Custom fonts won't work unless the end user has the font installed on their system. For best results, use web safe fonts that are common on most Windows & Macs.
CSS Font Stack: Web Safe and Web Font Family with HTML and CSS code.
For special situations, you may look at custom web fonts hosted on Google Fonts, Adobe Fonts (formerly Typekit) or Adobe Edge Fonts.
===========
MODERATOR'S UPDATE: 2/27/2022
Effective July 2022, Adobe Edge Fonts will be discontinued.
Please switch over to Adobe Fonts or other suitable font replacement.
==========
To use custom web fonts, you need to obtain the code from the respective website and paste it into the <head> of your documents.
Below an example with a Google Web Font.
Google Fonts
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Google Web Font</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<link href="https://fonts.googleapis.com/css?family=Kaushan+Script" rel="stylesheet">
<style>
h1 {
font-family: 'Kaushan Script', cursive, fantasy;
font-size: 4.50vw
}
p {
font-family: "Gill Sans", "Gill Sans MT", "Myriad Pro", "DejaVu Sans Condensed", Helvetica, Arial, "sans-serif";
font-size: 3vw;
}
</style>
</head>
<body>
<h1>This is a custom web font hostted on Google.</h1>
<p>This is a web safe font-family. Lorem ipsum dolor sit amet, consectetur adipisicing elit. Reiciendis excepturi sint, tempore asperiores debitis. Inventore aliquam iure autem veniam quisquam, voluptatem nihil tenetur ducimus explicabo dolore voluptatibus molestiae doloribus voluptate.</p>
</body>
</html>