8.4 HTML Basic Structure
A structured HTML document is easier to read and understand. Properly nested and well-organized elements help developers and browsers interpret the content correctly. This organization ensures that the web page displays as intended.
Every HTML document has a basic structure where:
<!DOCTYPE html>: This line tells the browser that this is an HTML5 document.<html>: This is the root element of an HTML page.<head>: This section contains meta-information about the HTML document, like the title.<title>: This sets the title of the web page, which appears in the browser tab.<body>: This section contains the content of the web page that you see in the browser.<h1>: This defines a large heading.<p>: This defines a paragraph.