An early charset, a title, and a viewport that does not forbid zoom
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Document title</title>
<meta name="description" content="">
</head>charset comes first in head. The viewport sets a device width and initial scale without disabling zoom. description is only a hint.
| Attribute | Description |
|---|---|
charset | Declares the document encoding, which should be utf-8. The element must be fully within the first 1024 bytes of the document. |
name | The metadata name, such as viewport or description. It is not a substitute for title or for link relationships. |
content | The value associated with name. For viewport, width=device-width, initial-scale=1 is a common starting point. |
- The description is a hint for search engines and social tools. It does not guarantee a search-result snippet. No network request is made from this fragment.
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Compare two files — DiffCheck</title>
<meta name="description" content="Compare text, code, and documents in the browser.">
</head>What this markup means
The charset declaration is the first element in head so decoding can start immediately. The viewport hint uses device width and initial-scale=1 and does not include user-scalable=no or maximum-scale=1. The title is the document title; the description is additional text that a search engine may ignore or rewrite. This is not a live SERP test.
Related: Tag catalog: <meta>, Tag catalog: <head>, Tag catalog: <title>, HTML tutorial: first document