Open a text editor like:
Save the file with the extension:
.html
Every HTML page starts with a basic structure.
<!DOCTYPE html>
<html>
<head>
<title>My First Page</title>
</head>
<body>
<h1>Hello World!</h1>
</body>
</html>
| Tag | Purpose |
|---|---|
| <html> | Main container for the webpage |
| <head> | Stores page information |
| <body> | Visible content goes here |
| <h1> | Main heading |
| <p> | Paragraph text |
Double-click the HTML file.
After editing the file:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Simple Page</title>
</head>
<body>
<h1>Welcome</h1>
<p>This is my first HTML page.</p>
</body>
</html>