# Bad value “ height=” for attribute “width” on element “iframe”: Expected a digit but saw “ ” instead.

> Canonical HTML version: https://rocketvalidator.com/html-validation/bad-value-height-for-attribute-width-on-element-iframe-expected-a-digit-but-saw-instead
> Attribution: Rocket Validator (https://rocketvalidator.com)
> License: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/)

A space before the `width` attribute value is causing the validator to misparse the `iframe` attributes, likely due to a missing closing quote on the `width` attribute.

This error typically occurs when there's a typo in the attribute syntax, such as a missing closing quote or extra spaces inside the attribute value. The validator reads the raw HTML and interprets `" height=` as part of the `width` value because the `width` attribute's opening quote was never properly closed.

The `width` and `height` attributes on an `iframe` element accept non-negative integer values representing pixels. Each attribute must have its value properly quoted and contain only digits.

## HTML Examples

### ❌ Incorrect

```html
<iframe src="page.html" width="600 height="400"></iframe>
```

In this example, the closing quote after `600` is missing. The validator sees the `width` value as `600 height=`, which is not a valid number.

### ✅ Correct

```html
<iframe src="page.html" width="600" height="400"></iframe>
```

Each attribute has properly matched opening and closing quotes, and the values contain only digits.
