Disable Zoom on pinch in mobile using HTML tag.

I am a Front end developer currently working on React JS, HTML, CSS, Python, Vue JS, Webpack, Babel, AEM etc.
Search for a command to run...

I am a Front end developer currently working on React JS, HTML, CSS, Python, Vue JS, Webpack, Babel, AEM etc.
No comments yet. Be the first to comment.
Are you planning to start your coding journey?. Then this is for you - a roadmap to help you achieve your goals.

7 ways in which you can add files to your commit using git add

As a website user, one would have come across links or buttons which say "Click to download" or "Download" on a website. Have you ever wondered how can you add one to your website?. Keep reading!!!. As part of this blog let us see how one can crea...

Display Hello World and custom message using two-way data binding

Build a random quote generator using an API - JavaScript

Kritika Pattalam Bharathkumar | Web Developer - The official blog of Kritika Pattalam Bharathkumar
22 posts
Front End Engineer | Writes about HTML, CSS, JavaScript and everything related to web development | Follow me on Twitter let's chat.
As a user when you open a site in mobile, we tend to pinch and zoom the page to see things more clearly. Have you ever wondered if that feature can be disabled?.
Yes, it can be disabled. What's more interesting is that it can be done by just a single line of code in HTML.
<!doctype html>
<html lang="en">
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0 ,
maximum-scale=1.0 , user-scalable=no"/>
...
</head>
<body>...</body>
</html>
name="viewport"
this means that this meta tag is used for device viewport
width=device-width
assigns the width of the device as the viewport width
initial-scale and maximum-scale is set to 1 -
which means it occupies the full 100% of the viewport on page load
user-scalable=no,
setting the value to no or 0 is what tells the browser to prevent the page from scaling(zoom) in/out
Lets connect on Twitter | LinkedIn for more web development related chats.