Setting Font Sizes
In straight HTML, the deprecated FONT element is also used to set font sizes. It enables you to set only seven different font sizes, of which only four (sizes 4, 5, 6, and 7) correspond to font sizes that are larger than the normal font size. By using CSS styles, however, you can set an unlimited range of font sizes.
You've already had some experience setting font sizes earlier in this book. To illustrate how large you can go when setting font sizes using CSS, here's an example that sets the H1 element's font size to 10 ems, or ten times the font size of the H1 element's parent element (see Figure 7.1):
<style type="text/css">
h1 { font-size: 10em; color: rgb(200,140,40); }
</style>
Figure 7.1. Using CSS, you can select as ...
Get Cascading Style Sheets (CSS) by Example now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.