# width attribute

*noun*

say it: **“WIDTH AT-ruh-byoot”** **/wɪdθ ˈætrəˌbjut/**

An HTML attribute that says how wide an image, video or iframe is meant to be, in pixels, so the browser can save room for it before the file arrives.

## What is **`width` attribute**?

**`width` attribute** — An attribute that supplies an element's intended width in CSS pixels.

## In a sentence

- “Once I gave the photo a **width attribute** and a height attribute, the text below it stopped jumping as the page loaded.”

Level: Novice · [More HTML terms at this level](https://www.ask-codey.com/glossary?category=html&level=1)

Updated: November 9, 2026

Source: https://www.ask-codey.com/glossary/width-attribute
