Know and understand the purpose of the <head> and <body> sections of a web page.
Every HTML5 document follows a basic skeleton:
<!DOCTYPE html>
<html>
<head>
…metadata…
</head>
<body>
…page content…
</body>
</html>
<head> SectionThe <head> contains information that is not displayed directly on the page but is essential for browsers, search engines and other user agents.
<title>; appears in the browser tab and in search results.<meta charset="UTF-8"> to ensure correct text display.<meta> tags for description, keywords, author, viewport, etc.<link rel="stylesheet">) and favicons.<body> SectionThe <body> holds all the content that users see and interact with.
<head> and <body>| Aspect | <head> |
<body> |
|---|---|---|
| Purpose | Provides metadata and resources for the document. | Contains the visible content and interactive elements. |
| Visibility to user | Not displayed on the page. | Rendered in the browser window. |
| Typical elements | <title>, <meta>, <link>, <style>, early <script> |
All content tags: <h1>–<h6>, <p>, <ul>, <table>, <img>, <video>, etc. |
| Impact on SEO | Title, description and keywords influence search rankings. | Content relevance and structure affect ranking. |
| Loading order | Parsed first; resources may be pre‑loaded. | Parsed after the head; rendered sequentially. |
Below is a minimal but complete HTML5 page illustrating the head and body sections.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>My First Web Page</title>
<meta name="description" content="A simple example page for ICT 0417.">
<link rel="stylesheet" href="styles.css">
</head>
<body>
<h1>Welcome to My Site</h1>
<p>This paragraph is part of the <code><body></code> section and will be displayed in the browser.</p>
<ul>
<li>Home</li>
<li>About</li>
<li>Contact</li>
</ul>
</body>
</html>
<head> – it will not be shown.<title> tag – browsers will display a generic title and SEO suffers.<head> at the top of the document flow and the <body> below it, with arrows indicating “metadata” and “visible content”.The <head> and <body> sections serve distinct but complementary roles. The head prepares the page for browsers and search engines, while the body delivers the actual user experience. Mastery of both sections is essential for creating well‑structured, accessible, and SEO‑friendly web pages.