HTML and CSS Reference
In-Depth Information
and there is no implied white space before, ater, above, or below an image.
Unless otherwise speciied, the bottom of the image is aligned with the base-
line of the text it is embedded in. Unless it is loated, it wraps with the words
immediately before and ater the image tag.
You'll read more about images, anchors, and links later in this chapter.
HTML Attributes
A number of HTML attributes can be used with any HTML element. he
class and style attributes, used earlier in this chapter, belong to this set of
global attributes. Here are a few global attributes recognized by most HTML4
and HTML5 browsers:
id Speciies a unique identiier that references the element in CSS
and scripts
class Speciies a semantic class that the element should be consid-
ered a member of
style Speciies CSS style rules that should be applied to the element
title Speciies a title for the element
lang Speciies the natural language of the element's text content
dir Speciies the direction, let-to-right or right-to-let, of the ele-
ment's text content
hidden Speciies whether the user agent should hide the element's
he language attribute, lang , afects how punctuation is applied to an ele-
ment's content, including hyphenation and the choice of ligatures and quota-
tion marks. Content enclosed in the quote element shows a diferent pair of
quotation marks, depending on the value of the language attribute set for
that element or inherited from one of its enclosing containers. An element's
language is a concept separate from the character set that is used to display the
page's text.
he title attribute's original purpose was to provide a window title for
links created by anchor and area elements that would display non-HTML data
such as images, text iles, and directory listings. Internet Explorer was the irst
browser to display the title attribute's value in a Windows tooltip when the
Search WWH ::

Custom Search