user-scalable=no in the meta tag in html
By: Gren in HTML5 Tutorials on 2023-04-03
user-scalable=no
is a value for the user-scalable
attribute in the viewport meta tag in HTML. This attribute controls whether or not a user is allowed to zoom in and out of a web page using pinch-to-zoom or other similar gestures on mobile devices.
Setting user-scalable=no
disables the ability for the user to zoom in and out of the web page. This can be useful in certain situations, such as when the layout of the web page is designed to be responsive to different screen sizes, or when the content of the web page is already optimized for a specific display size.
However, it is important to note that disabling user zoom can also limit accessibility for users who may have visual impairments or other accessibility needs. For this reason, it is generally recommended to allow users to zoom in and out of a web page, unless there is a specific design or content reason for disabling it.
Here is an example of how the viewport meta tag with user-scalable=no
would look in HTML:
<meta name="viewport" content=" width=device-width, initial-scale=1.0, user-scalable=no">
This sets the width of the viewport to the width of the device, sets the initial scale to 1.0 (which sets the default zoom level to 100%), and disables user scaling.
Add Comment
This policy contains information about your privacy. By posting, you are declaring that you understand this policy:
- Your name, rating, website address, town, country, state and comment will be publicly displayed if entered.
- Aside from the data entered into these form fields, other stored data about your comment will include:
- Your IP address (not displayed)
- The time/date of your submission (displayed)
- Your email address will not be shared. It is collected for only two reasons:
- Administrative purposes, should a need to contact you arise.
- To inform you of new comments, should you subscribe to receive notifications.
- A cookie may be set on your computer. This is used to remember your inputs. It will expire by itself.
This policy is subject to change at any time and without notice.
These terms and conditions contain rules about posting comments. By submitting a comment, you are declaring that you agree with these rules:
- Although the administrator will attempt to moderate comments, it is impossible for every comment to have been moderated at any given time.
- You acknowledge that all comments express the views and opinions of the original author and not those of the administrator.
- You agree not to post any material which is knowingly false, obscene, hateful, threatening, harassing or invasive of a person's privacy.
- The administrator has the right to edit, move or remove any comment for any reason and without notice.
Failure to comply with these rules may result in being banned from submitting further comments.
These terms and conditions are subject to change at any time and without notice.
Most Viewed Articles (in HTML5 ) |
Latest Articles (in HTML5) |
Comments