Post by account_disabled on Feb 24, 2024 8:04:40 GMT
The viewport tag contains special parameters specified in the HTML code. The meta tag includes a standard set of attributes with a corresponding value and represents the following element: Viewport meta tag The main attributes of the viewport meta tag: width – means the width of the site, which must be specified in pixels. You can specify the device-width role to set the page width equal to the width of a smartphone or other gadget; height is the height of the site in pixels. To set this parameter equal to the height of the device, use device-height; initial-scale – initial scaling factor. The indicator acquires values in the range from 0.1 to 10, as well as changing the scale of the desired page by default; user-scalable — an attribute that sets parameters for scaling the page (zoom in or out).
The values yes and no are used for application. In addition, you can specify additional parameters inside the code using the viewport tag. It is possible to write additional details if there is a need to prohibit the user from using scaling, as well as to set parameters Asia Phone Number List when the template automatically adapts to the orientation of the window. user-scalable ─ allows or prohibits the user from changing the scale (size) of the window; minimal-scale ─ the minimum scale of the window; maximal-scale ─ the maximum scale of the window; orientation ─ management of orientation; height – page height parameters. It is worth paying attention to the use of scaling attributes. It is not recommended to prescribe such values for non-adaptive pages user-scalable=no or initial-scale=1 together with maximum-scale=1 Such a combination can completely disable the zoom function, as a result of which the user will not be able to fully view the information.
It is recommended to choose the optimal value - scaling the page to the screen size in automatic mode. How to correctly configure and write the viewport tag in the code? HTML code elements in the CSS system (Cascading Style Sheets - the language for describing the appearance of the website) carry information that is transmitted to the browser for the correct display of the user's page. The question arises, where to write the viewport tag so that the site functions correctly according to the device model? The meta tag should be written on each page in the "Head" section, which must be scaled according to the screen resolution. The viewport meta tag is assigned to the block using the specified attributes. You can take a ready-made template and manually add parameters corresponding to an individual request.
The values yes and no are used for application. In addition, you can specify additional parameters inside the code using the viewport tag. It is possible to write additional details if there is a need to prohibit the user from using scaling, as well as to set parameters Asia Phone Number List when the template automatically adapts to the orientation of the window. user-scalable ─ allows or prohibits the user from changing the scale (size) of the window; minimal-scale ─ the minimum scale of the window; maximal-scale ─ the maximum scale of the window; orientation ─ management of orientation; height – page height parameters. It is worth paying attention to the use of scaling attributes. It is not recommended to prescribe such values for non-adaptive pages user-scalable=no or initial-scale=1 together with maximum-scale=1 Such a combination can completely disable the zoom function, as a result of which the user will not be able to fully view the information.
It is recommended to choose the optimal value - scaling the page to the screen size in automatic mode. How to correctly configure and write the viewport tag in the code? HTML code elements in the CSS system (Cascading Style Sheets - the language for describing the appearance of the website) carry information that is transmitted to the browser for the correct display of the user's page. The question arises, where to write the viewport tag so that the site functions correctly according to the device model? The meta tag should be written on each page in the "Head" section, which must be scaled according to the screen resolution. The viewport meta tag is assigned to the block using the specified attributes. You can take a ready-made template and manually add parameters corresponding to an individual request.