Getting Started

Welcome to HTML Mastery

Your complete guide to learning HTML from scratch to advanced level

🎯 What You'll Learn

This comprehensive course will take you from absolute beginner to HTML expert through:

  • Interactive Lessons with live code editors
  • Hands-on Projects to build your portfolio
  • Quizzes & Exercises to test your knowledge
  • Real-world Examples you can use immediately

Tip: Complete each lesson in order and practice with the code examples. Don't just read - code along!

Course Structure

Note: This is a complete learning environment. You don't need to install anything - just start coding in the built-in editors!

Lesson 1

HTML Document Structure

Learn the foundation of every HTML page

What is HTML?

HTML (HyperText Markup Language) is the standard markup language for creating web pages. It describes the structure of a web page and consists of a series of elements that tell the browser how to display content.

Key Point: HTML is not a programming language - it's a markup language that defines the structure of your content.

Basic HTML Structure

Every HTML document follows a specific structure. Let's examine the essential components:

basic-structure.html

Output Preview

💡 Practice Exercise

Try modifying the code above to:

  1. Change the page title to "My Practice Page"
  2. Add a second heading using <h2>
  3. Add a horizontal rule with <hr>
  4. Add a line break with <br>

Key Components Explained

1. DOCTYPE Declaration

The <!DOCTYPE html> declaration defines that this document is an HTML5 document. It must be the very first thing in your HTML document.

Remember: The DOCTYPE declaration is not case sensitive, but <!DOCTYPE html> is the standard for HTML5.

2. HTML Element

The <html> element is the root element and wraps all content on the page. The lang attribute specifies the language of the document.

Important: Always include the lang attribute in your <html> tag. This helps search engines and screen readers understand your content.

3. Head Section

The <head> element contains meta information about the document:

  • <meta charset="UTF-8"> - Defines character encoding (supports all languages)
  • <meta name="viewport"> - Controls layout on mobile browsers
  • <title> - Sets the page title shown in browser tabs

4. Body Section

The <body> element contains all the visible content of your web page - everything users see in their browser.

🧠 Quick Knowledge Check

Which tag is used to define the main content of an HTML document?

  • <head>
  • <body>
  • <main>
  • <content>
Lesson 2

Text Formatting & Headings

Learn how to structure and format text content

HTML Headings

HTML provides six levels of headings, from <h1> (most important) to <h6> (least important).

headings.html

Output Preview

💡 Practice Exercise

Create a short biography page with:

  1. Your name as an H1 heading
  2. A brief introduction as a paragraph
  3. Section headings for "Education", "Skills", and "Hobbies"
  4. Use at least three different text formatting tags

Text Formatting Elements

Semantic vs. Presentational Formatting

HTML has both semantic and presentational text formatting elements:

Semantic elements describe the meaning of text, while presentational elements only define how text looks.

Element Description Type
<strong> Important text Semantic
<em> Emphasized text Semantic
<mark> Highlighted text