Every HTML webpage follows a basic structure that helps browsers understand and display content correctly. This structure acts like the skeleton of a webpage.
An HTML document begins with <!DOCTYPE html>, which tells the browser that the document is written in HTML. The <html> tag wraps the entire webpage.
Inside the <html> tag are two main sections:
-
<head>– contains information about the page such as the title -
<body>– contains all the visible content on the webpage
Without this structure, browsers may not display webpages correctly. Understanding this layout is essential for writing proper HTML code.
Exercise Files