metadata
<meta>
Provides metadata about the document that other tags cannot express — charset, viewport, description, robots directives, and Open Graph tags. Placed only inside <head>.
<meta name="viewport" content="width=device-width, initial-scale=1"> Common attributes
| Attribute | Purpose |
|---|---|
| charset | Document encoding — always utf-8 |
| name | Metadata name: viewport, description, robots, theme-color, author |
| content | Value for the given name or http-equiv |
| http-equiv | HTTP-header equivalent: content-security-policy, refresh, x-ua-compatible |
| property | Open Graph key like og:title, og:image |
Examples
<meta charset="utf-8"> Must be the first tag in <head>
<meta name="viewport" content="width=device-width, initial-scale=1"> Enables responsive layout on mobile
<meta name="description" content="Learn HTML tags with examples."> Search-result snippet
<meta property="og:image" content="https://utilko.com/og.png"> Open Graph preview image for social shares
Gotcha
must appear within the first 1024 bytes of the document — put it first in
. is a void element: no closing tag.Related tags
<title>
The document's title, shown in the browser tab, bookmarks, and search-engine result snippets. It is required in every valid HTML document.
<link>
Defines a relationship between the current document and an external resource — stylesheets, icons, preloads, RSS feeds, canonical URLs, and manifest files. Lives inside <head>.
<a>
The anchor element creates a hyperlink to another page, a file, an in-page anchor, an email, or a phone number. It is the fundamental building block of the web's link graph and a key SEO signal.