HTML Introduction

What is HTML?

HTML stands for HyperText Markup Language. It is the standard language used to create and design documents that are displayed in a web browser. HTML defines the structure of web pages using elements and tags.

HTML is not a programming language — it is a markup language, which means it uses tags to describe content.


History and Evolution of HTML

  • 1991: HTML was first proposed by Tim Berners-Lee.
  • 1995: HTML 2.0 was released — it included basic elements like text, links, and forms.
  • 1997–1999: HTML 3.2 and 4.01 were introduced with support for scripting and styling.
  • 2014: HTML5 became the official standard — bringing multimedia, APIs, and new semantic elements.
  • Ongoing: HTML continues to evolve under the W3C and WHATWG standards.

HTML vs HTML5

Feature HTML HTML5
Doctype Complex and version-specific Simple: <!DOCTYPE html>
Multimedia Support Requires plugins (Flash, etc.) Native support for <audio>, <video>
Semantic Tags Limited (mostly <div>) Includes <header>, <footer>, <article>, etc.
APIs Not available Includes Web Storage, Geolocation, Canvas, etc.

How HTML Works in a Web Browser

When you open a web page, your browser receives an HTML document from a server. The browser reads the HTML and renders it into a visual representation based on the tags and content.

Browsers use a rendering engine to parse HTML, apply CSS styles, run JavaScript, and display the final web page.


Basic Structure of an HTML Document

Every HTML document has a defined structure with required tags. Here's the basic layout:

<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Page Title</title>
</head>
<body>

  <h1>Hello, world!</h1>
  <p>This is my first HTML page.</p>

</body>
</html>

Setting up Your First HTML Page

To write your first HTML page:

  1. Open any text editor (like VSCode, Notepad++, or Sublime Text).
  2. Write the HTML code (see example below).
  3. Save the file with a .html extension, for example: index.html
  4. Double-click the file or open it in a browser to view it.

Example: First HTML Page

<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>My First Page</title>
</head>
<body>

  <h1>Welcome to HTML!</h1>
  <p>This is a basic HTML document structure.</p>

</body>
</html>

Conclusion

HTML is the backbone of all web pages. It gives structure and meaning to content and enables browsers to interpret and display web content. Learning HTML is the first step for anyone entering the world of web development.

In the next chapters, we'll dive deeper into HTML elements like headings, paragraphs, links, images, and more.

If you have any questions, feel free to ask. Thank you for reading!

Thankyou!