HTML & CSSEasy
What is a meta description?
A meta description is a short summary of a page written in <meta name="description" content="..."> inside <head>. It is not a direct ranking factor, but search engines often display it as the snippet under your title, so a clear, compelling description improves click-through rate.
Writing a good one
- Length: about 120 to 160 characters; longer text is truncated (truncation depends on pixel width, not character count).
- Unique per page. Duplicates across pages waste the opportunity and may be ignored.
- Summarize the page honestly and include the main topic naturally; matching query words are often bolded in results.
- Add a reason to click: a benefit, a number or a call to action ("Free shipping", "Updated for 2026").
- Avoid quotation marks that end the attribute early, and avoid keyword stuffing.
What search engines do with it
Google rewrites the snippet in many cases, choosing text from the page that better matches the query. A well-written description still increases the chance yours is used.
Related tags
og:description/twitter:descriptioncontrol link previews in social apps and chat; they can reuse the same text.- In frameworks: Next.js
export const metadata = { description }, or React 19 rendering<meta name="description">directly in a component.
Interview tip
Mention the distinction: the <title> influences ranking and is the headline; the description mainly influences whether people click.
Code example
html
1<!doctype html>2<html lang="en">3<head>4 <meta charset="utf-8">5 <title>How to Make Cold Brew Coffee at Home | Bean Lab</title>6 <meta name="description" content="Make smooth cold brew in 3 steps with a jar and a filter. Ratios, steep times and storage tips, tested by baristas.">7 <meta property="og:description" content="Make smooth cold brew in 3 steps with a jar and a filter.">8</head>9<body>10 <h1>How to make cold brew coffee at home</h1>11 <p id="out"></p>12 <script>13 const d = document.querySelector('meta[name="description"]').content;14 document.getElementById("out").textContent =15 `Description is ${d.length} characters` + (d.length > 160 ? " (may be truncated)" : " (good length)");16 </script>17</body>18</html>
Practice this question
Open it in the study app to track progress, take notes, listen to the answer and work through the rest of the HTML & CSS set.