Early Access

Meta Tags

theme-color

Learn how to use the theme-color meta tag to improve your site.

Specifies the color that the browser UI should display. Primarily used on mobile browsers to customize the status bar and navigation bar colors.

Code Examples

<meta name="theme-color" content="#0000FF" />
Sets the theme color of the browser UI to blue, which could be ideal for a website with a blue branding theme.
<meta name="theme-color" content="#FFFFFF" />
Specifies the theme color as white. Suitable for websites with a light or minimalistic design. Note, though, that text readability should be considered when using lighter colors.
<meta name="theme-color" content="#" />
Invalid hex color code. This would cause the browser to ignore the theme-color directive and use the default color instead.
<meta name="theme-color" content="blue" />
Using a color name rather than a hex code. While some browsers might interpret this correctly, it’s less reliable than using hex codes.

Recommendations

  • Keep Consistency Across Devices
    Ensure the theme-color matches your brand’s primary color or the header color of your website for a uniform look across different devices.
  • Test on Multiple Browsers
    While widely supported, the appearance may vary across browsers. It’s crucial to test how the theming appears on different browsers to ensure a consistent user experience.

Related Documentation

Related Meta Tags

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">
Simple, concise, and clearly displays the application's purpose or brand.

charset

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">
Declares UTF-8 as the character encoding for the HTML document, supporting most characters and symbols in use today.

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">
Indicates to the browser that the site smoothly supports both light and dark themes, offering flexibility to match the user’s preferred theme setting.

default-style

http-equiv

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">
Correct use case where "Main Style" is precisely the title of one of the page’s alternative stylesheets.

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">
Prevents the browser from auto-detecting and linking phone numbers, allowing the site to control how and if phone numbers are clickable.