Complete HTML5 Tutorial
This tutorial will guide you through the basics of HTML5 — the standard language for building web
pages. Follow each step carefully and try the examples yourself. Let's get started!
1. Basic Structure of an HTML5 Document
Every HTML5 file starts with a document type declaration and the root element. Follow these steps:
1. Create a new file and save it as index.html. 2. Type the following structure.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>My First Web Page</title>
</head>
<body>
<h1>Hello, World!</h1>
</body>
</html>
2. Using Semantic Elements
HTML5 includes new semantic elements that help structure your content clearly. Use them to make
your code more organized and readable.
• — defines the header section
• — defines the navigation bar
• — defines a section of content
• — defines independent content
• — defines the footer section
<header>
<h1>Welcome to My Website</h1>
</header>
<nav>
<a href="#">Home</a>
<a href="#">About</a>
</nav>
<section>
<article>
<h2>My First Article</h2>
<p>This is a paragraph.</p>
</article>
</section>
<footer>
<p>© 2025 My Website</p>
</footer>
This tutorial will guide you through the basics of HTML5 — the standard language for building web
pages. Follow each step carefully and try the examples yourself. Let's get started!
1. Basic Structure of an HTML5 Document
Every HTML5 file starts with a document type declaration and the root element. Follow these steps:
1. Create a new file and save it as index.html. 2. Type the following structure.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>My First Web Page</title>
</head>
<body>
<h1>Hello, World!</h1>
</body>
</html>
2. Using Semantic Elements
HTML5 includes new semantic elements that help structure your content clearly. Use them to make
your code more organized and readable.
• — defines the header section
• — defines the navigation bar
• — defines a section of content
• — defines independent content
• — defines the footer section
<header>
<h1>Welcome to My Website</h1>
</header>
<nav>
<a href="#">Home</a>
<a href="#">About</a>
</nav>
<section>
<article>
<h2>My First Article</h2>
<p>This is a paragraph.</p>
</article>
</section>
<footer>
<p>© 2025 My Website</p>
</footer>