HTML Fundamentals

What Is HTML?

HTML (HyperText Markup Language) is the basic building block of every webpage. It defines the structure — what shows up on the page and in what order.

Your First HTML Page

<!DOCTYPE html>
<html>
<head>
  <title>My First HTML Page</title>
</head>
<body>
  <h1>Hello, World!</h1>
  <p>This is my first webpage.</p>
</body>
</html>
      

Explanation of Each Tag

Basic Structure You Should Remember Forever

<!DOCTYPE html>
<html>
<head>
  <meta charset="UTF-8">
  <title>Your Title</title>
</head>
<body>

  <!-- your content goes here -->

</body>
</html>
      

Common HTML Tags

Headings

<h1>Big title</h1>
<h2>Smaller title</h2>
<h3>Section title</h3>
      

Paragraphs

<p>This is a paragraph.</p>
      

Links

<a href="https://codetweakrs.net">Click me!</a>
      

Images

<img src="image.png" alt="My Image">
      

Lists

Unordered:
<ul>
  <li>Item 1</li>
  <li>Item 2</li>
</ul>
      
Ordered:
<ol>
  <li>First</li>
  <li>Second</li>
</ol>
      

Where Do You Write HTML?

How to Open Your Webpage

  1. Save as index.html
  2. Double-click the file
  3. Your browser opens it instantly

What’s Next?

The next tutorial teaches you the basics of JavaScript — the language that powers interactivity on websites.