Setting the H1 Rule

In HTML, the H1 element specifies the top-level (or level-one) heading for a page. Generally, there should only be one H1 element included in a page and it should be at or near the top of the page.

Setting the Font Size

By default, browsers display the H1 element in a font size that is larger than any of the other elements, because it is the top-level heading within an HTML document (see Figure 3.1).

Figure 3.1. Prior to any style being applied, the browser determines the size of an H1 element.

HTML also allows you to change the font size of the H1 and other elements, using the FONT element. The FONT element allows the setting ...

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.