How do you check a website’s viewport tag?

ProcrustesPR

To check a website’s viewport tag, search for viewport in your browser’s developer tools and confirm that the page’s head contains the corresponding meta tag. Then check the width and initial zoom settings in its content attribute. The recommended basic settings are width=device-width, initial-scale=1. Besides confirming that the tag exists, look for fixed-width settings and zoom restrictions. If a page still requires horizontal scrolling on a phone, that alone does not mean the viewport configuration is at fault.

ProcrustesPRProcrustesPRHow should I divide my DIY SEO budget?

Find the tag and confirm its location

Following Semrush’s instructions for Chrome, open the webpage you want to inspect, right-click the page, select “Inspect,” and go to the Elements panel in developer tools. Press Ctrl + F on Windows or Cmd + F on a Mac, then search for viewport.

The search may also find viewport in the page’s text, so confirm that the result is a meta element with name=”viewport” inside head. Compare it with this basic configuration:

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

Semrush’s 2023 article states that most CMS platforms add a viewport tag automatically. Still, inspect the page to confirm that the tag is there rather than relying solely on which CMS it uses.

Check the width and initial zoom

  • width: Controls the viewport’s width. device-width makes the width match the device, while width=500 sets a fixed width of 500 pixels. These are different settings.
  • initial-scale: Controls the zoom level when the page loads. The recommended basic value is 1. If you see initial-scale=3, the initial zoom level is set to 3; it is not a width setting.

Once you have confirmed that the tag exists, check the actual values in content for a fixed width or an initial zoom level that differs from the basic recommendation.

Check zoom restrictions without blaming every layout problem on the tag

If the tag also contains user-scalable, minimum-scale, or maximum-scale, check those as well. user-scalable controls whether users are allowed to zoom, while minimum-scale and maximum-scale limit the zoom range. minimum-scale should not exceed maximum-scale. Disabling zoom may prevent users from enlarging content for easier reading.

The effects of zoom settings can vary by browser. Semrush’s 2023 article notes that browsers may handle zoom attributes differently, and some allow users to force-enable zoom through accessibility settings.

In addition, awoo’s 2019 article points out that CSS settings can also cause content to extend beyond the screen. If a page requires horizontal scrolling, investigate the cause rather than assuming that a viewport tag is missing.

Use a site audit to find pages with missing tags

To check multiple pages, you can follow the method described in Semrush’s 2023 article: scan the website with Site Audit, go to the Mobile SEO category under Issues to find missing-tag issues, and select Learn more for instructions on fixing them. This is the workflow documented in that article; the current interface may differ. After identifying pages with missing tags, you can still return to those pages to verify the tags and their settings.

ProcrustesPRProcrustesPRWhy can I not find my published article on Google?

Viewport tags: perspectives from across the web

What is the problem with setting maximum-scale too low?

Semrush’s 2023 article states that a maximum-scale value below 3 does not meet accessibility guidelines because it limits how much users can enlarge the page. Disabling zoom also violates WCAG and may make reading more difficult. When checking the tag, read the actual settings rather than simply judging whether the page looks normal when it first loads. Different browsers may handle these restrictions differently.

What can viewport settings control when the virtual keyboard appears?

If the tag contains interactive-widget, that setting controls which viewports resize when an interactive widget, such as a virtual keyboard, appears. Semrush’s 2023 article uses the virtual keyboard as an example and lists three values: resizes-visual resizes only the visual viewport; resizes-content resizes both the visual and layout viewports; and overlays-content resizes neither.

How do you check the viewport’s height setting?

If the tag specifies height, first check whether it uses a fixed pixel value or device-height. Semrush’s 2023 article lists both as available settings and recommends device-height, but this does not mean every page must explicitly include height. Be sure to distinguish height from width, which controls the viewport’s width.

ProcrustesPREight SEO essentials for beginners: Website speed

References

  1. Mobile SEO必學!行動版網站健檢Search Console幫你做www.awoo.ai · 2019-06-24T00:38:34+00:00 — Source used in the article above.
  2. A Beginner’s Guide to Viewport Meta Tagswww.semrush.com · 2023-11-08T14:00:00Z — Discusses: What is the problem with setting maximum-scale too low?; What can viewport settings control when the virtual keyboard appears?
  3. The Ultimate HTML Tags List + Free Checklistwww.semrush.com · 2021-08-20T04:33:00Z — Source used in the article above.

Related articles

How should I divide my DIY SEO budget?Why can I not find my published article on Google?Eight SEO essentials for beginners: Website speedEight SEO essentials for beginners: Getting your pages indexedEight SEO essentials for beginners: Page titles and descriptionsThe Five Most Common Mistakes SEO Beginners MakeHow to Set Up Heading Tags for SEO: Define Topics and Hierarchy Before Adding KeywordsWhat are the benefits and development challenges of SPAs?
ProcrustesPR
ProcrustesPR