HTML 5: The Markup Language

imgimage # T

The img element represents an image.

Content model #

img = empty & img.attrs

Attribute model #

Element-specific attributes #

src = uri
A URL referencing a non-interactive, optionally animated, image that is neither paged nor scripted.
alt = normal-character-data
The fallback content for the image.
height = integer.non-negative
The height of the image, in CSS pixels.
width = integer.non-negative
The width of the image, in CSS pixels.
usemap = hash-name
A hash-name reference to a map element with which to associate the image.
ismap = "ismap" | ""
Specifies that its img element provides access to a server-side image map.
border = zero
Specifies that its img element represents a borderless image.

Assertions #

Tag omission #

The img element is a void element. An img element must have a start tag but must not have an end tag.

Permitted contexts #