Chapter 40. Using Text Elements Properly
Just about every Web designer has done it at one time or another: using an HTML tag to mark up some text based on how the result looks in a browser instead of what the tag is supposed to mark up. Need a quick line of bold text? Who among us hasn't been at least tempted to reach for a header tag, even if the text in question doesn't really function as a header? Need to add some whitespace? The blockquote tag does the trick, even when you aren't trying to format an offset quote.
Now that Cascading Style Sheets (CSS) have become somewhat reasonably reliable in most browsers, the old arguments for doing whatever works don't hold as much water. CSS allows any HTML element to look however you, the designer, ...
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.