html

Introduction to HTML

HTML (HyperText Markup Language) is the standard markup language for creating web pages. It describes the structure and content of a webpage using elements and tags.

What is HTML?

HTML stands for HyperText Markup Language. It's not a programming language, but rather a markup language that tells web browsers how to structure the content on a webpage.

Basic HTML Structure

Every HTML document follows a basic structure:

html
<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>My First Webpage</title>
  </head>
  <body>
    <h1>Hello, World!</h1>
    <p>This is my first webpage.</p>
  </body>
</html>
Preview

Key Components

  • <!DOCTYPE html>: Declares this is an HTML5 document
  • <html>: The root element that wraps all content
  • <head>: Contains metadata about the document
  • <body>: Contains the visible content of the webpage

Your First HTML File

Create a file called index.html and add the basic structure above. Open it in your web browser to see your first webpage!

Try It Yourself

html
<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <title>About Me</title>
  </head>
  <body>
    <h1>Welcome to My Page</h1>
    <p>My name is [Your Name] and I'm learning HTML!</p>
  </body>
</html>
Preview

Replace [Your Name] with your actual name and save the file. You've just created your first personalized webpage!

Practice Exercise

Now it's your turn! Try creating your own HTML page with a heading and paragraph.