Day 1: Introduction & Basic Structure

Goal

The goal of today is to understand what HTML is and how to build the basic skeleton of a web page.

What is HTML?

HTML stands for HyperText Markup Language. It is the standard language used to create webpages. HTML uses tags to describe the structure and content of a page.

Basic HTML Structure

Every HTML page has a basic structure. Here’s an example with comments to explain each part:

<!DOCTYPE html>        <!-- Declare HTML5 document type -->
<html>                  <!-- Root element of the page -->
  <head>                <!-- Contains metadata and page info -->
    <meta charset="UTF-8">  <!-- Sets character encoding -->
    <title>My First Page</title>  <!-- Title in browser tab -->
  </head>
  <body>                <!-- Visible content starts here -->
    <h1>Hello World</h1>   <!-- Heading level 1 -->
    <p>This is my first HTML page.</p>  <!-- Paragraph text -->
  </body>
</html>

Elements Explained

Practice

Try creating your own HTML page with the following:

  1. Put your name in a <h1> element.
  2. Add a short bio about yourself in a <p> element.
  3. Save the file as index.html and open it in your browser.

Example Solution

<!DOCTYPE html>
<html>
  <head>
    <meta charset="UTF-8">
    <title>My First HTML Page</title>
  </head>
  <body>
    <h1>John Doe</h1>
    <p>I am learning HTML to build websites. I enjoy coding and designing web pages.</p>
  </body>
</html>

Extra Tips