You’ll often see a meta tag in the header section of every HTML page. The most common type of tag is the following:
meta name="viewport" content="Width =device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
Copy the code
What does this tag mean?
Name indicates that viewPort is used by mobile devices. Content defines the properties of viewPort.
Device-width = device-width
Height indicates that the width displayed under the mobile device is the width of the device.
User-scalable indicates user scaling ability, and no indicates disallow.
Initial-scale Indicates the scaling ratio of the device to the viewport
Maximum and minimum indicate the maximum and minimum values for scaling, respectively. Note that maximum must be minimum large.
The meta tag above tells the browser not to zoom when displaying on mobile.