CodeBlanks Logo Icon CodeBlanks

Meta description

HTML course · Advanced · Lesson 24/56

Learn description, author and robots meta tags.

What is a meta description?

When a search engine lists your page, it shows a short summary next to the <title>. That summary comes from the meta description tag: <meta name="description" content="...">.

The description explains the page in one or two sentences. It appears under the title in search results and shapes whether a visitor clicks. A well-written description raises the click-through rate.

The author and robots tags

<meta name="author"> names the person who wrote the page. <meta name="robots"> tells search engines how to treat the page.

Common robots values: index, follow (add to index, follow links), noindex (do not index) and nofollow (do not follow links). If you write noindex by mistake, the page disappears from search results.

How do you write a good description?

The description should stay under 155 characters; if you write longer, the search engine cuts the end with an ellipsis. Lead with the keyword, then explain the page's value.

Do not repeat the page title. Write a unique description for every page; duplicate descriptions do not help search engines. End with a call to action: "Read", "Explore", "Start".

Exercise Add meta tags for a blog post

Add three meta tags to the head for a blog post: <meta name="description" content="..."> (page summary, at least 10 characters), <meta name="author" content="..."> (author name) and <meta name="robots" content="index, follow">.

Show example solution
<head>
  <title>Blog Post</title>
  <meta name="description" content="This week we explore modern web design trends in our blog post.">
  <meta name="author" content="Alex Smith">
  <meta name="robots" content="index, follow">
</head>

Test yourself

  1. Which one is the meta description tag?

    <meta name="..." content="...">
    • <meta name="keywords" content="blog, design">
    • <meta name="description" content="Modern web design trends.">
    • <meta charset="utf-8">
    • <title>About</title>
    Show answer

    <meta name="description" content="Modern web design trends."> — Correct. The name="description" attribute carries the page summary.

  2. Complete the meta description tag

    <meta name="description" content="____">
    Show answer
    <meta name="description" content="This week we talk about modern web design.">
  3. Match the meta tag with its role

    name="description"
    Page summary
    name="author"
    Author name
    name="robots"
    Indexing rule
    charset
    Character encoding

All lessons in Advanced