Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Learn Understanding HTML Document Structure | HTML Document Structure
Ultimate HTML

bookUnderstanding HTML Document Structure

An HTML document is organized like a tree of nested tags. The following tags represent the minimum required structure of any HTML page:

index.html

index.html

copy

Document Type Declaration

<!DOCTYPE html> is not a tag. It's a required declaration that tells the browser:

  • This document uses HTML5;
  • How to interpret and render the page.

It must appear as the very first line of every HTML document.

index.html

index.html

copy

Top-Level Elements

Top-level elements define the overall structure of a webpage.

html

The <html> element is the root of the document. Everything you want the browser to read must be inside this tag. The lang attribute declares the document's language:

index.html

index.html

copy

head

The <head> section contains metadata: information about the document.

It may include: the page title, character encoding, stylesheets, scripts, SEO metadata.

This content is not shown on the page itself.

index.html

index.html

copy

body

The <body> contains everything the user can see: text, images, links, buttons, forms, multimedia.

index.html

index.html

copy

1. What is the minimum required set of tags, which serves as the basis for any HTML document?

2. What are the correct statements?

question mark

What is the minimum required set of tags, which serves as the basis for any HTML document?

Select the correct answer

question mark

What are the correct statements?

Select the correct answer

Everything was clear?

How can we improve it?

Thanks for your feedback!

SectionΒ 3. ChapterΒ 2

Ask AI

expand

Ask AI

ChatGPT

Ask anything or try one of the suggested questions to begin our chat

Suggested prompts:

Can you show me an example of a complete HTML document with these elements?

What is the difference between the `<head>` and `<body>` sections?

Why is the `lang` attribute important in the `<html>` tag?

bookUnderstanding HTML Document Structure

Swipe to show menu

An HTML document is organized like a tree of nested tags. The following tags represent the minimum required structure of any HTML page:

index.html

index.html

copy

Document Type Declaration

<!DOCTYPE html> is not a tag. It's a required declaration that tells the browser:

  • This document uses HTML5;
  • How to interpret and render the page.

It must appear as the very first line of every HTML document.

index.html

index.html

copy

Top-Level Elements

Top-level elements define the overall structure of a webpage.

html

The <html> element is the root of the document. Everything you want the browser to read must be inside this tag. The lang attribute declares the document's language:

index.html

index.html

copy

head

The <head> section contains metadata: information about the document.

It may include: the page title, character encoding, stylesheets, scripts, SEO metadata.

This content is not shown on the page itself.

index.html

index.html

copy

body

The <body> contains everything the user can see: text, images, links, buttons, forms, multimedia.

index.html

index.html

copy

1. What is the minimum required set of tags, which serves as the basis for any HTML document?

2. What are the correct statements?

question mark

What is the minimum required set of tags, which serves as the basis for any HTML document?

Select the correct answer

question mark

What are the correct statements?

Select the correct answer

Everything was clear?

How can we improve it?

Thanks for your feedback!

SectionΒ 3. ChapterΒ 2
some-alt