What is HTML?

HTML (HyperText Markup Language) is the standard language used to create and design web pages. It describes the structure of a webpage and consists of a series of elements that tell the browser how to display content.

History and Versions of HTML

HTML 1.0 (1991): The first version, a very basic version of HTML.

HTML 2.0 (1995): Standardized version with additional features.

HTML 3.2 (1997): Included new features such as tables and applets.

HTML 4.01 (1999): Introduced more complex features like CSS support.

XHTML (2000): A stricter, XML-based version of HTML.

HTML5 (2014): The latest version, which includes powerful new features like video playback and improved semantics for better accessibility and SEO.

How HTML Works

HTML uses “tags” to mark up content. Tags are enclosed in angle brackets (< >) and typically come in pairs: an opening tag and a closing tag. The content goes between the tags.

Example of a simple HTML element:

<p> is the opening tag.

</p> is the closing tag.

This is a paragraph. is the content.

Basic Structure of an HTML Document

An HTML document has a basic structure that includes several key elements:


<!DOCTYPE html>
<html>
<head>
    <title>Page Title</title>
</head>
<body>
    <h1>This is a Heading</h1>
    <p>This is a paragraph.</p>
</body>
</html>

<!DOCTYPE html>: This declaration defines the document type and version of HTML.

<html>: The root element of an HTML page.

<head>: Contains meta-information about the document (like the title, character set, styles, links, etc.).

<title>: Specifies the title of the document, which is shown in the browser’s title bar or tab.

<body>: Contains the content of the HTML document, such as text, images, links, tables, etc.