In HTML (Hypertext Markup Language), the basic structure of a document is defined using a set of tags. Here’s an example of a basic HTML document structure:
<!DOCTYPE html> <html> <head> <title>Page Title</title> </head> <body> <h1>Heading 1</h1> <p>This is a paragraph.</p> </body> </html>
Let’s break down the structure:
<!DOCTYPE html>
: This declaration specifies the version of HTML being used, which is HTML5 in this case.<html>
: The root element of an HTML document. All other elements are contained within this tag.<head>
: This section contains meta-information about the document, such as the title and linking to external stylesheets or scripts. It is not displayed on the web page.<title>
: This tag is used to specify the title of the document, which appears in the browser’s title bar or tab.<body>
: The main content of the HTML document is placed within this tag. It contains all the visible elements displayed in the web page.<h1>
: A heading element. It represents the main heading of the page and is displayed in a larger font size by default.<p>
: A paragraph element. It is used to define a paragraph of text.
You can add more HTML elements within the <body>
tag to structure and organize your content further.