HTML

Modern Meta Tags (viewport, theme-color, etc.)

admin by @admin ADMIN
1h ago
May 31, 2026
Public
0 0 up · 0 down Sign in to vote
The non-obvious meta tags that improve mobile rendering, status-bar coloring, and dark-mode behavior in 2025 browsers. Copy this block whole.
HTML
Raw
<meta charset="UTF-8">

<!-- Responsive layout — required for mobile -->
<meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover">

<!-- Help iOS / Android browsers tint their UI to match the page -->
<meta name="theme-color" content="#ffffff" media="(prefers-color-scheme: light)">
<meta name="theme-color" content="#0a0a0a" media="(prefers-color-scheme: dark)">

<!-- Tell the browser the page supports both color schemes (form controls, scrollbars) -->
<meta name="color-scheme" content="light dark">

<!-- iOS-specific: how the page behaves when added to home screen -->
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">

<!-- SEO essentials -->
<title>Specific, ~60-char page title — Site Name</title>
<meta name="description" content="One or two sentences describing this page. Under 160 chars so it doesn't truncate in search results.">
<link rel="canonical" href="https://example.com/this-page">

<!-- Optional but recommended -->
<meta name="generator" content="MyApp 1.2">
<meta name="referrer" content="strict-origin-when-cross-origin">
Tags

Save your own code snippets

Create a free account and build your private vault. Share publicly whenever you want.