Is The Viewport Meta Tag Necessary

Brian Mayrose
Sep 9, 2018 · 1 min read
<meta name="viewport" content="width=device-width, initial-scale=1" />

The basic fundamentals of modern web pages are revolved around responsiveness. In the head section of your HTML code, you need to put a viewport meta tag.

<!DOCYPE html>
<html lang="en">
<head>
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title> Page Title</title>
<head>
<body>
</body>
</html>

When viewing a webpage from a desktop this meta tag has little influence over what you see. On a mobile device, the viewport meta tag will refactor the basic layout of the page to be more friendly on smaller devices.

Here is an example of a page without the viewport meta tag:

Check out the live example of a page without a viewport meta tag Here.

Check out the live example of a page with the viewport meta tag being used Here.

more documentation on the viewport meta tag here.

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade