Fonts
File Location
DotNetProjects
└── HTMLCSSPreWork
└── 1-HTML-Basics
└── 2-CSS-Basics
04-fonts.css
04-fonts.htmlDescription
<!--1-->
<!DOCTYPE html>
<html>
<head>
<title>Font</title>
<link rel="stylesheet" type="text/css" href="04-fonts.css">
</head>
<body>
<div class="wrapper">
<!--2-->
<h1>Font</h1>
<p>In CSS, there are two types of font family names:</p>
<ul>
<li><b>generic family:</b> a group of font families with a similar look (ex: Serif)</li>
<li><b>font family:</b> a specific font family (ex: "Times New Roman" or Arial)</li>
</ul>
<p>The font-family property should hold several font names as a fallback in case the browser doesn't support the first font you picked. <br>Always start with the font you want, and end with a generic family. Also, if the font family is more than one word, it must be in <br>quotation marks (ex: "Times New Roman").</p>
<hr>
<!--3-->
<h2>Here is a list of the CSS font properties:</h2>
<dl>
<dt>font:</dt>
<dd>sets all the font properties in one declaration</dd>
<dt>font-family:</dt>
<dd>specifies the font family for text</dd>
<dt>font-size:</dt>
<dd>specifies the font size of text</dd>
<dt>font-style:</dt>
<dd>specifies the font style for text</dd>
<dt>font-weight</dt>
<dd>specifies the weight of a font</dd>
</dl>
<hr>
<!--5-->
</div>
</body>
</html>Discussion
Challenge
Last updated