How to create a basic HTML structure?
Updated On: 2024-06-02
Creating a basic HTML structure is very easy. This article provides a clear understanding on basic HTML structure, step by step guide on how to create it, related resources and advanced examples.
HTML basic structure
Now lets see the step by step guide to create its different sections
Step 1) DOCTYPE Declaration
<!DOCTYPE html>
DOCTYPE tells the browser that the document is an HTML5 document. Every HTML file should start with this <!DOCTYPE>. This is not an HTML tag rather it is an information to the browser telling the file type.
Step 2) HTML Tag
<html lang="en"> <html>
The root element of an HTML document.
Step 3) Head Section
<head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>My First HTML Page</title> </head>
Contains meta-information about the document.
Step 4) Title Tag
<title>My First HTML Page</title>
Sets the title of the document, which is shown in the browser's title bar or tab.
Step 5) Body Tag
<body> <h1>Hello, World!</h1> <p>This is a paragraph.</p> </body>
Contains the content of the document that will be displayed to the user.
lets see some more examples of HTML structure.
01) Simple Personal Webpage
02) Blog page
03) E-commerce Product Page
04) Portfolio page
05) Company landing page
Related video
Related Resources
For more information, you can use the following resources: