|
In this chapter you have learned how to use headings, text elements, lists, and entities. More important, you have mastered the concept of nesting and have learned how to use elements, attributes, and values in a Web page. As you practice these techniques, use the following reference charts to help you remember what you have learned.
The elements which allow you to work with text are straightforward and easy to use. To cause text to display using the elements listed in the table below, simply enclose it between the proper set of tags. For example, to emphasize text, place it inside the <em> element like this: <em>Emphasized Text</em>.
To Do This | Use This |
---|---|
Indicate a heading | <h#> </h#> (may use #1–6) |
Emphasize text | <em> </em> |
Strongly emphasize text | <strong> </strong> |
Identify text as keyboard input | <kbd> </kbd> |
Identify text as a citation | <cite> </cite> |
Identify text as a variable (as in a computer program) | <var> </var> |
Identify text as a defining instance (of a term) | <dfn> </dfn> |
Identify text as sample output | <samp> </samp> |
Identify text as an acronym | <acronym> </acronym> |
Identify text as an abbreviated term | <abbr> </abbr> |
Set apart a portion of text that contains author information | <address> </address> |
Identify text as computer code | <code> </code> |
Create a superscript | <sup> </sup> |
Create a subscript | <sub> </sub> |
Preserve your spacing and formatting | <pre> </pre> |
Indicate inserted text | <ins> </ins> |
Indicate deleted text | <del> </del> |
Lists are easy to create and provide a useful tool for menus, site directories, lists of links, and outlines. There are three different types of lists to choose from: ordered (numbered), unordered (bulleted), and definition (glossary). The trick to doing lists well is remembering to nest your elements properly. The elements necessary for creating lists are included in the following table:
To Do This | Use This |
---|---|
Create an ordered (numbered) list | <ol> </ol> |
Create an unordered (bulleted) list | <ul> </ul> |
Create a definition list | <dl> </dl> |
Add a list item | <li> </li> |
Add a definition term (definition list only) | <dt> </dt> |
Add a definition description (definition list only) | <dd> </dd> |
Specify a starting number (ordered list only) | start="#" (Deprecated) |
Specify a bullet type (unordered list only) | type="disc | circle | square" (Deprecated) |
Specify a number type (ordered list only) | type="a | A | i | I | #" (Deprecated) |
Set the value for a particular list item | value="#" (Use Arabic numerals only, no matter what type of numbering is used in the list.) (Deprecated) |
In the following table are some entities that you might be likely to use. Notice that some have both numeric and character versions, while others only are represented by numeric codes. This list is not complete, but includes some of the most common characters. Download Appendix C for a more extensive list (www.jamespence.com).
To Display This | Use This Numeric Entity | Use This Character Entity | This Character Will Display |
---|---|---|---|
Exclamation | ! | ! | |
Quotation | " | " | “ |
Number | # | # | |
Dollar | $ | $ | |
Percent | % | % | |
Ampersand | & | & | & |
Apostrophe | ' | ‘ | |
Asterisk | * | * | |
Plus sign | + | + | |
Comma | , | , | |
Hyphen | - | - | |
Period | . | . | |
Slash | / | / | |
Colon | : | : | |
Semicolon | ; | ; | |
Less than | < | < | < |
Equal sign | = | = | |
Greater than | > | > | > |
Question | ? | ? | |
“At” sign | @ | @ | |
Left bracket | [ | [ | |
Backslash | \ | \ | |
Right bracket | ] | ] | |
Left curly brace | { | { | |
Right curly brace | } | } | |
Tilde | ~ | ~ | |
Copyright | © | © |
|
Trademark | ® | ® |
|
|