Early Access
viewport
Defines how a website is displayed on mobile devices, influencing its width, scale, and initial zoom level. It is essential for creating responsive designs that adapt to various screen sizes.
Code Examples
Recommendations
- Ensure Readability on All DevicesSetting the viewport width to device-width and initial scale to 1 ensures your site is readable on all devices.
- Avoid Large Fixed WidthsUsing a large fixed width can lead to a poor user experience on small screens, as users may have to scroll horizontally to view content.
Related Documentation
Related Meta Tags
application-name
Defines the name of the web application as it should be displayed when bookmarked or added to a mobile home screen.
<meta name="application-name" content="MyApp">
charset
Defines the character encoding standard for the HTML document. Character encoding is essential for rendering text correctly in browsers.
<meta charset="charset" content="UTF-8">
color-scheme
Instructs the browser on what color themes (light or dark mode) are supported and preferred for the content, ensuring visual consistency and accessibility.
<meta name="color-scheme" content="light dark">
default-style
Specifies the name of the preferred stylesheet to use on a web page. This allows users or user agents to choose the default stylesheet amongst many provided.
<meta http-equiv="default-style" content="Main Style">
format-detection
Controls how telephone numbers, email addresses, and physical addresses are detected and displayed by the browser. By default, many browsers can automatically detect this information and style or link it accordingly, which might not always align with the web developers’ intentions.
<meta name="format-detection" content="telephone=no">
Community