</>
ValidateHTML

Missing Viewport Meta Tag

The viewport meta tag tells mobile browsers how to scale the page. Without it, mobile browsers render the page at a desktop width (usually 980px) and then zoom out, making everything tiny and unreadable.

Why It Matters

Missing the viewport meta tag is the #1 reason sites don't look responsive on mobile, even with perfect CSS media queries. Google's mobile-first indexing also checks for this tag; missing it can hurt your mobile search rankings.

Code Examples

❌ Invalid
<head>
  <title>My Page</title>
  <!-- No viewport tag -->
</head>
✓ Valid
<head>
  <title>My Page</title>
  <meta name="viewport" content="width=device-width, initial-scale=1">
</head>

How to Fix

  • 1Add <meta name="viewport" content="width=device-width, initial-scale=1"> to your <head>.
  • 2Don't use maximum-scale=1 or user-scalable=no. They break accessibility by preventing zoom.
  • 3Place the viewport tag early in <head>, before any CSS or scripts.
  • 4This is a one-time fix. Add it to your base template and it applies everywhere.

Check Your HTML Now

Our validator detects this error automatically and shows the exact line number.

Open HTML Validator
Recommended

Cloudways · Managed Cloud Hosting

Fix this HTML error, then deploy on Cloudways managed cloud (AWS, GCP, DigitalOcean). 20% off 3 months with code VALIDATEHTML.

Start free trial

Related HTML Errors

← View all HTML errors