O
last year
Onyelusicountry asked

Why is the content inside the <head> section not shown on the webpage? I thought it would display when the code runs.

Abhay Jajodia
Expert
last year
Abhay Jajodia answered

Hi Onyelusi,

The <head> is for page information the browser needs, not for content the user reads on the page. Things in <head> include the page title, meta info, links to CSS, and scripts.

The content that shows on the webpage goes inside the <body>.

Example:

<head>
  <title>My Page</title>
</head>

<body>
  <h1>This will show on the page</h1>
</body>

<title> shows in the browser tab, but the <h1> shows on the actual page.

If you have more questions, I am here to help 😊

HTML
This question was asked as part of the Learn HTML course.