Page Title and Character Set
Now let's put something into head. Almost every web page has these two elements there.
The first one is title, the title of the page. The browser shows it in the tab (in the picture from the previous exercise, it was Start Coder), and search engines such as Google show it as the headline of each search result. The preview here has no tab, so you won't see the title in it, but it's there.
<title>My First Page</title>The second one is meta, short for metadata, which means data about the page. This one tells the browser which character set the page is written in, so that it reads letters such as é, ñ or č correctly instead of showing strange symbols. utf-8 is a character set that covers the letters of almost every language in the world.
<meta charset="utf-8">There are two new things here. The charset="utf-8" part is called an attribute. We'll explain attributes in Lesson 3, so for now, just copy it as it is. And meta has no closing tag, because it has no content. A few other elements work the same way, and we'll meet them later.
The meta element goes first in head, before title, so that the browser knows how to read the letters before it gets to any text:
<head>
<meta charset="utf-8">
<title>My First Page</title>
</head>Instructions
Inside the head element, create a title element with a title for your page, for example My First Page.
Above the title element, as the first element inside head, add <meta charset="utf-8">.
Start programming for free
5/8