
What is HTML and its Basic Structure?
What is HTML?
HTML stands for HyperText Markup Language. It is a markup language used to describe the structure of web pages. HTML elements are the building blocks of web pages, and they are represented by tags. These tags provide instructions to the web browser on how to display the content.
An HTML document is essentially a plain text file that contains the content of a webpage along with HTML tags that define the page’s structure and layout.
Basic Structure of an HTML Document
The basic structure of an HTML document includes several key components. Let’s take a look at each of them:
1. Doctype Declaration: Every HTML document starts with a doctype declaration. This tells the browser what version of HTML the document is using. In modern web development, the declaration for HTML5 is used:

2. The HTML Tag: The <html> tag is the root element of an HTML document. All other elements are nested inside this tag

The lang attribute specifies the language of the document’s content. In this example, en stands for English.
3. The Head Section: The <head> section contains meta-information about the document, such as the title, character set, styles, and scripts. Here’s a basic example:

- <meta charset=”UTF-8″>: Specifies the character encoding for the document.
- <meta name=”viewport” content=”width=device-width, initial-scale=1.0″>: Ensures the page is responsive on different devices.
- <title>: Sets the title of the document, which appears in the browser tab.
- <link rel=”stylesheet” href=”styles.css”>: Links to an external CSS file for styling.
4. The Body Section: The <body> section contains the content of the document that is displayed to users. This can include text, images, links, and more:

Putting It All Together: Here’s how a complete HTML document might look

Conclusion
Understanding the basic structure of an HTML document is the first step in web development. By mastering these foundational elements, you can create well-structured and organized web pages. As you continue to learn, you’ll be able to add more advanced features and styles to your websites.
For further inquiries or training sessions, feel free to contact us. Click the button below to reach out to us on WhatsApp