Web development

Write a useful meta description

Write a short, accurate description of what a page helps the reader do. Give each article a description suited to its actual contents rather than repeating a site-wide keyword list.

Worked example

HTML example · save as example.html and open in a browser

<meta name="description" content="Read a small JSON file in Node.js, catch malformed input, and validate the fields before using the result.">

How it works

A good description summarizes the task and useful boundaries. It can help a reader decide whether the page answers the question, and search engines may use it as a snippet when appropriate. It should agree with the visible article.

Limits and mistakes

Search engines can generate a different snippet from page content, and there is no universal character count that guarantees a fixed display. Do not promise examples, tests, or features the page does not contain.

Check the result

Compare the description against the article’s first sections. Check for duplicates across the collection and confirm the HTML attribute is escaped correctly when text contains quotes or ampersands.

Sources

Reference documentation for the behavior used in this guide: