Your first document
Language and description
Declare the page language and write a concise meta description that helps assistive technology and search results understand the document.
5 minute lesson
Add the document language to the opening html tag:
<html lang="en">
The lang attribute helps screen readers choose the correct pronunciation rules. It also helps translation and search tools understand the content.
Use the language the page is actually written in. For Italian, use it. For Brazilian Portuguese, use pt-BR when that regional distinction matters.
The head can also contain a short description:
<meta
name="description"
content="Notes from a three-day cycling trip around Copenhagen."
>
The description does not appear in the page body. Search engines may show it below the page title, although they can choose a different excerpt.
Write it for a person deciding whether the page answers their question. Keep it specific. Avoid lists of keywords.
Your document now has a useful foundation:
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="Notes from a cycling trip.">
<title>Copenhagen cycling notes</title>
</head>
<body>
<h1>Copenhagen cycling notes</h1>
</body>
</html>Lesson completed