Detailed answer
Start with a doctype, an html element with a language, a head for metadata, and a body for visible content.
Declare UTF-8 early and include a viewport setting. Save the document as index.html. The title labels the browser tab while h1 introduces visible content.
Example
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>My page</title>
</head>
<body>
<h1>Hello HTML</h1>
</body>
</html>
Understanding the behavior
The language attribute belongs on the root element so assistive technology can choose a suitable pronunciation. Charset describes how bytes become characters; the viewport setting controls the initial mobile layout viewport. These settings solve different problems and should not replace one another.
Practical implementation notes
After saving, change only the title and reload. The tab should change without changing the heading. This separates document metadata from visible content and makes a useful first debugging exercise.
How to check it
Put the visible greeting in body and the browser-tab name in title, then save and reopen the file.
Expected result
The tab reads My page and the document displays Hello HTML.
Watch out: Confirm the file is .html rather than .html.txt.
Read the reference ↗