16 More HTML Elements for Web Designers
HTML has only a few dozen elements, but we busy developers often forget to use the right tag for the job in hand. It’s all too easy to add a <div>
or a <span>
when there are more suitable alternatives. —Craig Buckler
This chapter covers
- Checking out some underused but important HTML elements
- Linking to files on your site
- Linking to a specific element on a page
- Adding special characters and comments
You may have noticed that after a flurry of HTML-related activity in the early chapters of the book, subsequent chapters had a decidedly CSS flavor. That's not too much of a surprise, because after you know a few basic elements such as <div>
, <p>
, and <span>
, you can hang a lot of CSS baggage on them and create some fine-looking web pages. But there's more to HTML than these basic elements. You saw a few useful page structure elements in Chapter 11, but in this chapter, you'll extend your HTML know-how even further with elements for everything from abbreviations to variables, advanced uses of the <a>
element, adding nonkeyboard characters to your pages, and even adding comments to make your code more readable. It's a regular HTML extravaganza!
Lesson 16.1: Other Text-Level Elements You Should Know
Covers: Text-level elements