0% found this document useful (0 votes)
6 views

2. HTML Basic Structure

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views

2. HTML Basic Structure

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

The basic structure of an HTML document consists of several elements

that define the overall structure and content of a web page. Here's a simple
HTML template:

Let's break down the basic structure:

​ <!DOCTYPE html>:
● Declares the document type and version of HTML. In modern HTML
(HTML5), this declaration is used.

​ <html lang="en">:
● Defines the root of the HTML document. The lang attribute specifies the
language of the document (e.g., "en" for English).

​ <head>:
● Contains meta-information about the HTML document, such as character
set, viewport settings, and the page title.
​ <meta charset="UTF-8">:
● Specifies the character encoding for the document. "UTF-8" is widely used
and supports a wide range of characters.

​ <meta name="viewport" content="width=device-width,
initial-scale=1.0">:
● Sets the viewport settings for responsive design. It ensures that the page
adapts to various device screen sizes.

​ <title>:
● Sets the title of the web page, which appears in the browser's title bar or
tab.

​ <body>:
● Contains the content of the HTML document, such as text, images, links,
and other elements.

​ <!-- Your content goes here -->:
● This is a comment, used to add notes to the code. You'll replace it with
your actual content.

Remember to customize the title tag with your page title and add your
content within the <body> tags. This basic structure provides a foundation
for building HTML documents.

You might also like