A Complete Guide to Web Design

(やまだぃちぅ) #1
104 Chapter 7 – Formatting Text

Summary of Text Tags


Web Design in a Nutshell, eMatter Edition

<h1> through <h6> NN: 2, 3, 4 - MSIE: 2, 3, 4, 5 - HTML 4 - WebTV - Opera3
<hn>...</hn>

Specifies that the enclosed text is a heading. There are six different levels of head-
ings, from<h1>to<h6>, with each subsequent level displaying at a smaller size.
<h5> and<h6> usually display smaller than the surrounding body text.
Attributes
align=center|left|right
Used to align the header left, right, or centered on the page.Microsoft Internet
Explorer 3.0 and earlier do not support right alignment.

<p> NN: 2, 3, 4 - MSIE: 2, 3, 4, 5 - HTML 4 - WebTV - Opera3
<p>...</p>

Denotes the beginning and end of a paragraph when used as container. Many
browsers will also allow the<p>tag to be used without a closing tag to start a
new paragraph. The container method is preferred, particularly if you are using
Cascading Style Sheets with the document.
Attributes
align=center|left|right
Aligns the text within the tags to the left, right, or center of the page.

Text Appearance (Inline Styles)


The following tags affect the appearance of text. With the exception of<base-
font>, all of the tags listed in this section define inline styles, meaning they can
be applied to a string of characters within a block element without introducing
line breaks. (<basefont>is used to specify the appearance of type for a whole
document or for a range of text.)

<abbr> NN: 2, 3, 4- MSIE: 2, 3, 4, 5- HTML 4 -WebTV- Opera3
<abbr>...</abbr>

Identifies the enclosed text as an abbreviation. It has no inherent effect on text
display, but can be used as an element selector in a style sheet.
Attributes
title=string
Provides the full expression for the abbreviation. This may be useful for non-
visual browsers and search engines.
Example
<ABBR TITLE="Massachusetts">Mass.</ABBR>
Free download pdf