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
<head> <title>My Page</title> <!-- No viewport tag --> </head>
<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 ValidatorHostinger — Fast & Affordable Web Hosting
Deploy clean, validated HTML on reliable hosting.
Related HTML Errors
Missing DOCTYPE Declaration
Learn why <!DOCTYPE html> is required and what happens when it's missing. Fix quirks mode rendering issues.
Missing Lang Attribute
Learn why the lang attribute on the html element is critical for screen readers, translations, and SEO.
Missing Charset Declaration
Why declaring charset UTF-8 is essential and how missing charset causes encoding issues and garbled text.