The head and body HTML Tags

Let's explain what the <head> and <body> tags do in this HTML:

<!DOCTYPE html>
<html lang="en">
<head>
  <title>My Page</title>
</head>
<body>
  Hi, here is some text.
</body>
</html>

The head

The head of the document is where we specify the <title>, which shows up as follows:

web page with text

The body

In between the two <body> tags is where we specify the content of the web page. The content can include images, video, links, forms, and more.

Next: Open an HTML File in a Browser

Comments

Leave a comment

What color are brown eyes? (spam prevention)
Submit
Code under MIT License unless otherwise indicated.
© 2020, Downranked, LLC.