Understanding 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
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
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
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
body
The <body> contains everything the user can see: text, images, links, buttons, forms, multimedia.
index.html
1. What is the minimum required set of tags, which serves as the basis for any HTML document?
2. What are the correct statements?
Thanks for your feedback!
Ask AI
Ask AI
Ask anything or try one of the suggested questions to begin our chat
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?
Awesome!
Completion rate improved to 2.38
Understanding 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
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
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
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
body
The <body> contains everything the user can see: text, images, links, buttons, forms, multimedia.
index.html
1. What is the minimum required set of tags, which serves as the basis for any HTML document?
2. What are the correct statements?
Thanks for your feedback!