What is the viewport meta tag in HTML?
The viewport meta tag tells a mobile browser how to size the page. Without it, phones pretend the screen is about 980 pixels wide and show a tiny zoomed-out page.
<meta name="viewport" content="width=device-width, initial-scale=1.0">
width=device-widthuses the real width of the device.initial-scale=1.0starts with no zoom.
Add it in the head of every page. It is the first step of responsive design.
Learn more about the similar topics:
| Tutorials |
|---|
| No Content Found. |
| Exercises & Assignments |
|---|
| No Content Found. |
| Interview Questions & Answers |
|---|
| No Content Found. |