Codeloft
0 0 XP

Page title and description

6 min 20 XP + 10 for no hints

Every HTML page has two parts. <body> holds what visitors see. <head> holds information about the page that isn't shown on it.

The <title> in the head appears on the browser tab and as the blue headline in search results. A <meta name="description"> gives search engines a one-sentence summary to show under it.

The viewport meta tag makes the page fit phone screens instead of showing a shrunk desktop page.

Example
<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="utf-8">
  <title>Sunny Bakes | Fresh bread daily</title>
</head>
<body>
  <h1>Sunny Bakes</h1>
</body>
</html>
The preview only shows the body. The checks read the head for you.

Your tasks

0 of 3 done
  1. Add a <title> to the head
  2. Add a meta description of at least 20 characters
  3. Add the viewport meta tag

Quick check

Where does the text inside <title> appear?

pets.htmlUpdates as you type