HTML/CSSBeginner#html#structure

What is the difference between the <head> and <body> sections of an HTML document?

<head> contains metadata not rendered directly on the page — title, meta tags, links to stylesheets, and scripts. <body> contains all visible content rendered in the browser viewport.

Example
<html>
<head>
  <title>My Page</title>
  <link rel="stylesheet" href="style.css">
</head>
<body>
  <h1>Visible content</h1>
</body>
</html>

Related Questions

1
HTML/CSSBeginner#html#accessibility

What is the purpose of the alt attribute versus the title attribute on images?

Open
2
HTML/CSSBeginner#html#javascript

What is a data attribute and how is it used?

Open
3
HTML/CSSBeginner#html#elements

What is the difference between <ul>, <ol>, and <dl>?

Open