**`<meta>`** is a void (self-closing) element that lives in `<head>` and comes in a few distinct forms: `<meta charset="UTF-8">` declares text encoding, `<meta name="viewport" ...>` controls mobile scaling/responsiveness, `<meta name="description" content="...">` supplies the snippet text search engines often show under your title, and `<meta name="robots" content="noindex">` can tell search engines not to index a page. Each `<meta>` tag typically sets exactly one piece of metadata.
1Understanding <meta>
`<meta>` is a void (self-closing) element that lives in <head> and comes in a few distinct forms: <meta charset="UTF-8"> declares text encoding, <meta name="viewport" ...> controls mobile scaling/responsiveness, <meta name="description" content="..."> supplies the snippet text search engines often show under your title, and <meta name="robots" content="noindex"> can tell search engines not to index a page. Each <meta> tag typically sets exactly one piece of metadata.
meta description doesn't directly affect ranking, but a well-written one (under ~155 characters) strongly influences whether people click your result — it's effectively free ad copy in the search results.
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="Learn HTML for free with interactive lessons.">
</head>2Practical Example
Here is a real-world application of <meta> showing how it is used in production HTML.
<!-- Preventing search engines from indexing a page -->
<meta name="robots" content="noindex, nofollow">3Best Practices
Follow these guidelines when working with <meta>:
1. Always include <meta charset="UTF-8"> as the first line in <head>
2. Include a unique <meta name="description"> per page for better search snippets
3. Add <meta name="viewport" content="width=device-width, initial-scale=1"> for proper mobile rendering
Tip: meta description doesn't directly affect ranking, but a well-written one (under ~155 characters) strongly influences whether people click your result — it's effectively free ad copy in the search results.
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="Learn HTML for free with interactive lessons.">
</head>