HTML Tutorial: Master HTML Structure and Elements

This comprehensive HTML tutorial covers the fundamental building blocks of web pages. Learn how to use HTML elements to structure content, add images, create links, and much more. Improve your web development skills today!



Introduction to HTML

HTML (HyperText Markup Language) is the fundamental language for creating web pages. This introduction will give you a foundational understanding of HTML structure and elements.

What is HTML?

HTML is a markup language that describes the structure and content of a web page. It uses elements to tell the web browser how to display text, images, links, and other content.

A Simple HTML Document

Example: Basic HTML Structure

<!DOCTYPE html>
<html>
<head>
  <title>Page Title</title>
</head>
<body>

  <h1>My First Heading</h1>
  <p>My first paragraph.</p>

</body>
</html>
Output
            (Displays "Page Title" in the browser tab, "My First Heading" as a large heading, and "My first paragraph." as a paragraph)
        

Understanding HTML Elements

An HTML element consists of a start tag, content, and an end tag:

<tagname>Content</tagname>

For example:

<h1>My First Heading</h1>

<p>My first paragraph.</p>

Some elements are empty and don't have an end tag (e.g., the <br> element).

Web Browsers and HTML

Web browsers (like Chrome, Firefox, Safari) interpret HTML code and render it visually on the screen. The browser doesn't display the HTML tags themselves, but uses them as instructions to build the webpage.

HTML Page Structure

A basic HTML page consists of the <html> element, containing a <head> (for metadata like the title) and a <body> (for visible content).

Brief History of HTML

Year Version/Event
1989 Tim Berners-Lee invents the World Wide Web.
1991 HTML is invented by Tim Berners-Lee.
1993 Dave Raggett drafts HTML+.
1995 HTML 2.0 is defined.
1997 HTML 3.2 is recommended by W3C.
1999 HTML 4.01 is recommended by W3C.
2000 XHTML 1.0 is recommended by W3C.
2008 HTML5 First Public Draft.
2012 HTML5 Living Standard.
2014 HTML5 is recommended by W3C.
2016 HTML 5.1 Candidate Recommendation.
2017 HTML 5.1 2nd Edition and HTML 5.2 are recommended by W3C.

This tutorial uses the latest HTML5 standard.

Video: HTML Introduction