HTML and CSS Reference
In-Depth Information
The rendering done by Internet Explorer 8 does not completely match what was shown
under Internet Explorer 9 or many of the other competing browsers such as Firefox,
Safari, or Google Chrome. For example, Internet Explorer 8 doesn't support styles for
rounded corners and drop shadows. All of this underscores an important point: You may
fi nd variations between one browser and another in how your page is rendered, espe-
cially when using the newest HTML5 elements and CSS styles. This means you have to
test your page under multiple browsers and devices, and make sure that any differences
in format or layout do not impact your users' ability to read and understand your page.
Marking Text-Level Elements
Grouping elements like paragraphs and headings start their content on a new line.
Another type of element is a
text-level element
, which marks content within a group-
ing element. A text-level element is like a phrase or a collection of characters within a
paragraph or heading. Text-level elements do not start out on a new line, but instead
fl ow alongside of, or
inline
with, the rest of the characters in the grouping element.
Figure 1-35 lists some of the text-level elements in HTML.
Figure 1-35
Text-level elements
Text-Level Element
Description
A hypertext link
a
abbr
An abbreviation
b
Text offset from the surrounding content (usually displayed in
boldface
text)
A citation (usually displayed in
italics
)
cite
Program code (usually displayed in a
fixed width
font)
code
del
Deleted text (usually displayed with a strikethrough line)
A definition term (usually displayed in
italics
)
dfn
Emphasized content (usually displayed in
italics
)
em
i
Text representing an alternate voice or mood (usually displayed in
italics
)
ins
Inserted text (usually displayed with an
underline
)
Keyboard text (usually displayed in a
fixed width
font)
kbd
mark
Highlighted or marked text (usually displayed with a highlight. HTML5 only)
Quoted text (occasionally enclosed in “quotes”)
q
samp
Sample computer code (usually displayed in a
fixed width
font)
small
Text displayed in a smaller font than surrounding content
A span of generic text
span
strong
Strongly emphasized content (usually displayed in
boldface
text)
sub
Subscripted text
Superscripted text
sup
A date and time value (HTML5 only)
time
var
Programming variables (usually displayed in
italic
)
To practice using text-level elements in conjunction with grouping elements, you'll
return to the HTML demo page.
Text-level elements should
always be nested within
grouping elements such as
paragraphs or headings.