3. The Basic HTML Document Structure
Every professional HTML document follows a required basic structure. You must memorize these four core components.
3.1 The Four Core Components
html
Component Breakdown:
<!DOCTYPE html>: This declaration must be the very first thing in your HTML document. It tells the browser that this document is an HTML5 document.<html>: This is the root element. Everything else in the document must be contained within this tag.<head>: This section contains metadata—information about the HTML document that is not displayed on the page itself (like the character set, links to stylesheets, and the title).<body>: This section contains all the visible content of the page: text, images, videos, links, etc.
The Document Title
The <title> element, placed inside the <head>, sets the text that appears on the browser tab or window frame.
html