Page Structure
A complete HTML document starts with a doctype, then an html element that holds a head and a body.
The head holds information about the page, such as its title. The body holds everything people actually see.
Example
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>My page</title>
</head>
<body>
<h1>Hello</h1>
</body>
</html>- Always set lang on the html element. Screen readers and translation tools use it.
Exercise
Which element holds everything visible on the page?
<html> <head><title>Page</title></head> <>Hi</> </html>
Quiz Test
These free lessons are for learning. Join a full course for projects, mentor feedback and a verified certificate.