Structure of an HTML document (website) explained
HTML documents are made up of elements. Elements are like building blocks that are used to create the structure of a web page.
The name tells the browser what kind of element it is, and the attributes provide additional information about the element.
The basic structure of an HTML document is as follows:
<!DOCTYPE html>
<html>
<head>
<title>This is the title of my page</title>
</head>
<body>
This is the body of my page.
</body>
</html>
The <!DOCTYPE html> declaration tells the browser what version of HTML the document is using.
The <html> element is the root element of the document.
The <head> element contains metadata about the document, such as the title and the character encoding.
The <title> element is used to specify the title of the document. The title is displayed in the browser's title bar.
The <body> element contains the visible content of the website. The content of the <body> element can be anything, such as text, images, links, and tables.