English العربية Português Japanese

HTML Introduction

HTML is the skeleton of the web. Without HTML, there would be no internet as we know it.

What is HTML?

HTML (HyperText Markup Language) is the standard language for creating web pages. It is not a programming language but a markup language — it uses tags to tell the browser how to display content.

Every web page you see, from a simple blog to a complex e-commerce platform, is built on HTML. HTML defines the structure of a web page: headings, paragraphs, images, links, tables — the "skeleton" of everything.

💡 Simple Analogy: Imagine a web page as a house. HTML is the structural framework (walls, doors, windows), CSS is the decoration (colors, styles), and JavaScript is the plumbing and electrical system (interactivity).

A Simple HTML Document

Every HTML document is made up of a series of tags. Here is the most basic HTML document structure:

HTML
<!DOCTYPE html>
<html>
<head>
  <title>My First Website</title>
</head>
<body>
  <h1>Hello World!</h1>
  <p>This is my first paragraph.</p>
</body>
</html>
▶ Try It Yourself

Code Explanation

HTML Tag Syntax

HTML tags usually come in pairs, consisting of an opening tag and a closing tag:

HTML
<tagname>Content goes here</tagname>

A few tags have no content and are called empty tags. Examples include the line break tag <br> and the horizontal rule tag <hr>.

✅ Best Practice: Always use lowercase for tag names. While <P> also works, <p> is more standard and readable.

HTML Attributes

Tags can provide additional information through attributes. Attributes are written inside the opening tag in the format attribute="value":

HTML
<a href="https://www.example.com">This is a link</a>
<img src="photo.jpg" alt="A photo">
⚠️ Note: Attribute values must be wrapped in quotes. We recommend using double quotes " " for consistency.

HTML Versions

HTML has gone through several versions since its creation. We currently use HTML5, the latest standard. HTML5 introduced many new features:

📌 Rest Assured: This entire tutorial is based on the HTML5 standard. Everything you learn here is current and production-ready.

Development Tools

To write HTML, you only need two things:

  1. A text editor — We recommend VS Code (free, lightweight), Sublime Text, or Notepad++
  2. A web browser — Chrome, Edge, or Firefox all work great

Write code in your editor, save it as an .html file, and open it in a browser — it's that simple.

🚀 Try It Yourself: Open Notepad, copy the example code above, save it as myfirst.html, and double-click to open it in your browser. Congratulations — you've just created your first web page!

📖 Summary

📝 Exercises

  1. Create your first web page: Open Notepad (or VS Code), copy the first code example from this chapter, save it as myfirst.html, and double-click to open it in your browser. Modify the content inside the <h1> and <p> tags to introduce yourself, save, and refresh the browser to see the changes.
  2. Inspect a real web page: Open any website (like Wikipedia), right-click and select "View Page Source". How many tags can you recognize?
100%