The CSS font-size property sets the size of text rendered by an element. A type size is the relative size of each character, commonly written in pixels using px. Regular page text defaults to 16px, though 20px may feel more comfortable to read. section 3.2.3
font-size: size;
Use font-size followed by a size value and a semicolon in a CSS rule. section 3.2.3
Make text larger
To set text to 20 pixels, use `font-size: 20px;`. Change only the number when adjusting the size, and keep the px unit in place. If text feels cramped or hard to read, try increasing its size by a pixel or two. section 3.2.3 section 4.4
Font sizes help distinguish the parts of a page. A typical page can use a larger title, smaller second-level headings, and regular body text. Default sizes include 32px for an h1, 24px for an h2, about 18.2px for an h3, and 16px for normal text, but you can choose sizes that better fit the design. section 3.2.7
When requesting generated CSS, specify sizes separately for the page parts that need different emphasis:
- Set a type size for the page title and subtitle. section 3.2.8
- Set a type size for second-level headings. section 3.2.8
- Set a type size for regular page text. section 3.2.8
Size also works with page width and spacing. Larger text may call for a wider page, while smaller text can fit a narrower one. For more accessible sizing, convert pixel measurements to rem: by default, 1rem equals 16px, so 20px is 1.25rem, 24px is 1.5rem, 32px is 2rem, and 48px is 3rem. A rem size is relative to the default font size a browser user has chosen. section 4.4 section 5.4
For reusable styling, target a class rather than changing every paragraph individually. For example, `.entry-text { font-size: 20px; }` makes text in elements with the `entry-text` class larger. section 5.4
Choose font sizes deliberately in a page prompt, then fine-tune the generated CSS by changing the numeric values. This gives titles, headings, summaries, and body text a clear visual hierarchy without changing the page content. section 3.5 section 5.2.3








