@font-face{
font-family: "Verana";
src: url("Verana-Regular.otf");
}
You can get the free fonts here at Arkandis Digital Foundry to play around with custom fonts.
The url can be a local resource within the local server, or a remote resource on the internet.
The way you would use the font-face is just like a regular font:
h2 {font-family: Verana; font-size: 24pt;}
Here is the entire HTML markup:
<html>
<head>
<style>
@font-face{
font-family: "Verana";
src: url("Verana-Regular.otf");
}
h2 {font-family: Verana; font-size: 24pt;}
</style>
</head>
<body>
<h2>Verana Font</h2>
</body>
</html>
Previous: CSS Parent Child Selectors

No comments:
Post a Comment