liveBook · Manning

Img element

The HTML img element embeds an image resource in a document.

How 3 Manning books explain it

Web Design Playground, Second Edition

The HTML img element embeds an image resource in a web document.

How it is used
Embeds separate image files, provides accessible alternatives, links images, aligns them with text, and adapts them to changing container widths.
How deep it goes
Explains syntax, file paths, accessibility, linking, alignment, and responsive sizing, but stops short of advanced image delivery.
Examples
Uses a company logo, a clickable logo, trail images aligned with labels, and an image scaling inside a responsive aside.
What you can do after
Build it from scratch by embedding, describing, linking, aligning, and responsively sizing images with HTML and CSS.

Read how Web Design Playground, Second Edition explains img element →

Web Design Playground

An HTML element that embeds an image in a web page.

How it is used
Embeds separate image files in page content, including logos, thumbnails, linked images, and semantically framed figures.
How deep it goes
Defines syntax, file paths, accessibility text, tooltips, inline flow, and alignment, while deferring image backgrounds to CSS.
Examples
Uses a company logo, gallery thumbnails, linked pictures, and a standard src-alt-title code pattern.
What you can do after
Build it from scratch by locating an image file, writing an img element, supplying alt text, and adjusting alignment.

Read how Web Design Playground explains img element →

Build a Website with ChatGPT

The img tag is HTML markup that embeds an image resource in a web page.

How it is used
Embeds external image files in an HTML page and supplies their locations and alternative descriptions.
How deep it goes
Defines src and alt, explains file paths and accessibility, and stops short of advanced image behavior.
Examples
Uses logo files, an old road-marker photograph, descriptive alt text, and empty alt text for decorative images.
What you can do after
Build it from scratch by inserting an image, pointing src to its file, and writing appropriate alt text.

Read how Build a Website with ChatGPT explains img element →

Related concepts

These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.