Quick Reference: Text, Lists, and Entities


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.

Work with Text

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>

Create Lists

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)

Insert Entities

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

&#33;

!

Quotation

&#34;

&quot;

Number

&#35;

#

Dollar

&#36;

$

Percent

&#37;

%

Ampersand

&#38;

&amp;

&

Apostrophe

&#39;

Asterisk

&#42;

*

Plus sign

&#43;

+

Comma

&#44;

,

Hyphen

&#45;

-

Period

&#46;

.

Slash

&#47;

/

Colon

&#58;

:

Semicolon

&#59;

;

Less than

&#60;

&lt;

<

Equal sign

&#61;

=

Greater than

&#62;

&gt;

>

Question

&#63;

?

“At” sign

&#64;

@

Left bracket

&#91;

[

Backslash

&#92;

\

Right bracket

&#93;

]

Left curly brace

&#123;

{

Right curly brace

&#125;

}

Tilde

&#126;

~

Copyright

&#169;

&copy;

Trademark

&#174;

&reg;




How to Do Everything with HTML & XHTML
How to Do Everything with HTML & XHTML
ISBN: 0072231297
EAN: 2147483647
Year: 2003
Pages: 126

Similar book on Amazon

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net