# meta-viewport-require

> Ensures every HTML document includes a meta viewport tag within the head element for proper responsive design.

A `<meta name="viewport">` must be present in `<head>` tag.

Level: Error

## Config value

[Section titled “Config value”](#config-value)

* `true`: enable rule
* `false`: disable rule

### The following patterns are **not** considered rule violations

[Section titled “The following patterns are not considered rule violations”](#the-following-patterns-are-not-considered-rule-violations)

```html
<html><head><meta name="viewport" content="width=device-width, initial-scale=1"></head></html>
```

### The following patterns are considered rule violations

[Section titled “The following patterns are considered rule violations”](#the-following-patterns-are-considered-rule-violations)

```html
<!-- Missing meta viewport -->
<html><head></head></html>


<!-- Empty meta viewport content -->
<html><head><meta name="viewport" content=""></head></html>


<!-- Whitespace-only meta viewport content -->
<html><head><meta name="viewport" content=" "></head></html>
```

## Why this rule is important

[Section titled “Why this rule is important”](#why-this-rule-is-important)

The `<meta name="viewport">` tag is used to control the viewport of the page, which helps with responsive design.