Name
img — <img />
Places an image on the page. The src
and alt
attributes are required. Many
attributes of the img
element
have been deprecated in favor of Cascading Style Sheets for
presentation and positioning.
Attributes
Core, Internationalization, Events
align="bottom|left|middle|right|top"
Deprecated. Specifies the alignment of an image using one of the following values:
Value
Resulting alignment
bottom
Aligns the bottom of the image with the text baseline. This is the default vertical alignment.
left
Aligns the image on the left margin and allows subsequent text to wrap around it.
middle
Aligns the text baseline with the middle of the image.
right
Aligns the image on the right margin and allows subsequent text to wrap around it.
top
Aligns the top of the image with the top of the tallest object on that line.
alt="
text
"
Required . Provides a string of alternative text that appears when the image is not displayed. Internet Explorer 4.0+ and Netscape 6 on Windows display this text as a “tool tip” when the mouse rests on the image.
border="
number
"
Deprecated . Specifies the width (in pixels) of the border that surrounds a linked image.
height="
number
"
Specifies the height of the image in pixels. It is not required but is recommended to speed up the rendering of the web page.
hspace="
number
"
Deprecated . Specifies (in number of pixels) the amount of space to leave clear to the left and right of the image.
ismap="ismap"
Indicates that the graphic is used as the basis for a server-side image map (an image ...
Get HTML and XHTML Pocket Reference, 3rd Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.