Chapter 44. Creating Custom Formatting Styles

For as beloved as HTML's formatting tags are in certain circles of Web design, these tags are pretty limited. They give you only the most basic formatting options: boldface, italic, underline, and strikethrough.

TIP

The formatting tags in HTML include b (boldface), i (italic), u (underline), and s or strike (strikethrough).

You saw in Topic 43 how to mimic the effects of HTML's formatting tags with a simple style sheet. CSS opens the door to many other possibilities for formatting, as Table 44.1 shows.

Table 44.1. Common CSS Formatting Attributes
CSS ATTRIBUTEPOSSIBLE VALUESEXAMPLE
font-weightbold, bolder, lighter, normalfont-weight: bolder;
font-styleitalic, oblique, normalfont-style: oblique;
font-variant ...

Get Web Design Garage 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.