HTML and CSS Reference
In-Depth Information
4.1.2.4. The class, id, style, and title attributes
Use the
id
attribute to create a label for the paragraph that can later be
used to unambiguously reference that paragraph in a hyperlink target,
for automated searches, as a stylesheet selector, and with a host of oth-
er applications. [
The id attribute, 4.1.1.4
]
Use the optional
title
attribute and quote-enclosed string value to
provide a descriptive phrase for the paragraph. [
The title attribute,
Use the
style
attribute with the
<p>
tag to create an inline style for
the paragraph's contents. The
class
attribute lets you label the para-
graph with a name that refers to a predefined class of the
<p>
tag previ-
ously declared in some document-level or externally defined stylesheet.
Class-identified paragraphs lend themselves well to computer process-
ing of your documentsfor example, extracting all paragraphs whose
class name is "citation," for automated assembly of a master list of cita-
4.1.2.5. Event attributes
As with divisions, a browser recognizes many user-initiated events, such
as when a user clicks or double-clicks within a tag's display space, if
the browser conforms to the current HTML or XHTML standard. With
the respective
on
attribute and value, you may react to those events
by displaying a user dialog box or activating some multimedia event.
4.1.2.6. Allowed paragraph content
A paragraph may contain any element allowed in a text flow, including
conventional words and punctuation, links (
<a>
), images (
<img>
), line
breaks (
<br>
), font changes (
<b>
,
<i>
,
<tt>
,
<u>
,
<strike>
,
<big>
,
<small>
,
<sup>
,
<sub>
, and
<font>
), and content-based style changes (
<acronym>
,