What is HTML?

HTML, or HyperText Markup Language, is the standard markup language used for creating web pages and web applications. It defines the structure and layout of a web document by using various tags and attributes to describe the content. HTML documents are interpreted by web browsers to render the content of a web page.

History of HTML:

  • Early Development: HTML was first introduced by Tim Berners-Lee while working at CERN in 1989. The initial version, HTML 1.0, was very basic and included only a few tags for structuring text documents.

  • Evolution: Over the years, HTML has gone through several iterations, with each new version introducing new features, elements, and improvements. HTML 2.0 was published in 1995, followed by HTML 3.2 in 1997, HTML 4.01 in 1999, and XHTML 1.0 in 2000.

  • HTML5: The latest major version of HTML is HTML5, which was finalized in 2014. HTML5 introduced many new elements and attributes, multimedia support (such as video and audio), enhanced forms, canvas for drawing graphics, and improved semantics for better accessibility and search engine optimization (SEO).

  • Living Standard: Unlike its predecessors, HTML5 is a "living standard" maintained by the World Wide Web Consortium (W3C) and the Web Hypertext Application Technology Working Group (WHATWG). This means that it continues to evolve and receive updates over time.

What is HTML Document (HTML Doc):

An HTML document, often referred to as an HTML file or web page, is a text file containing HTML markup that defines the structure and content of a web page. It typically consists of a combination of HTML elements, such as tags, attributes, and text content, arranged in a hierarchical structure. HTML documents can include text, images, links, multimedia, forms, and other types of content.

Here's a simple example of an HTML document:

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Sample HTML Document</title>
</head>
<body>
    <h1>Hello, World!</h1>
    <p>This is a sample HTML document.</p>
</body>
</html>

In this example:

  • <!DOCTYPE html> declares the document type and version of HTML being used.
  • <html> is the root element that wraps all other elements in the document.
  • <head> contains metadata and links to external resources.
  • <meta> specifies metadata such as character encoding and viewport settings.
  • <title> sets the title of the web page displayed in the browser's title bar or tab.
  • <body> contains the main content of the web page.
  • <h1> is a heading element.
  • <p> is a paragraph element.

HTML documents are the building blocks of the World Wide Web and are interpreted by web browsers to render web pages for users to interact with.