top of page
  • Writer's pictureBrent Payne

The viewport <meta> tag does not have a width set

Loud Interactive has observed that the queried URL includes a viewport <meta> tag that lacks a width attribute.


Why is this important?

Understand that the viewport is the browser window’s section where you can see website content. The viewport size changes with the gadget. It's smaller on mobile compared to desktop. A viewport <meta> element gives browsers directions on managing the dimensions and scale of the page.


Using 'width=device-width' in your viewport <meta> tag lets the page match the device's width in pixels that work across all devices. If the width isn't specified, browsers on mobile will default to desktop-width layouts, trying to adapt by scaling or enlarging text, potentially causing inconsistencies for users who may need to zoom or tap to interact properly.


What does the Optimization check?

The Optimization is meant to activate when it finds an internal URL housing a viewport <meta> tag lacking a width setting.


Examples that trigger this Optimization:

Any URL incorporating a viewport <meta> tag without a width value in the <head> section will trigger this Optimization. For example:

<!doctype html><html lang="en"><head>  <meta name="viewport" content="initial-scale=1">  ...</head><body>...</body></html>


How do you resolve this issue?

To fix this, ensure the viewport width is specified as 'device-width' to instruct the browser to adhere to the device's width.


For instance:

<meta name="viewport" content="width=device-width, initial-scale=1">


Further Reading

1 view0 comments

Recent Posts

See All

The skip-link target should exist and be focusable

At Loud Interactive, we're committed to ensuring that digital accessibility is at the forefront of website design and development. During our SEO audits, we look for and attempt to identify an area of

Timed meta refresh must not exist

At Loud Interactive, we regularly perform a SEO audits. We often stumble upon an important issue that could significantly impact user experience and accessibility on websites. We're talking about the

bottom of page