Create a seamless address bar display on mobile

To fill the top part of mobile displays with a custom color, insert the theme-color meta tag into your index.html document and set the content property to your chosen color.

When viewing a website, the default behaviour of mobile displays is surround the address bar at the top of the screen with the browser default color (usually white).

This often creates a contrasting boundary with your website which appears immediately below the address bar.

By including the theme-color meta tag in your index.html file, you can select a color that matches the background color of the first element on your page (usually the header).

<meta name="theme-color" content="#0b0828">

The address bar should now flow seemless into your website as if it was part of the header.

Leave a Comment