Skip to content

Hyper Text Markup Language introduction

HyperText Markup Language (HTML) is the standard markup language used to create and structure content on the World Wide Web. It forms the backbone of virtually every web page by providing a set of tags and attributes that define the structure, layout, and semantic meaning of the content. HTML documents consist of a series of elements, each enclosed within angle brackets (< >), which instruct web browsers on how to display the content to users.

Key Characteristics of HTML:

  1. Markup Structure: HTML documents are structured using a hierarchical tree-like structure composed of nested elements. Each element represents a distinct part of the content, such as headings, paragraphs, lists, images, links, and multimedia.
  2. Semantic Meaning: HTML incorporates semantic elements that convey the meaning and purpose of the content to both browsers and search engines. Semantic elements such as <header>, <nav>, <main>, <article>, <section>, <aside>, and <footer> provide contextual information about the content’s role within the document.
  3. Text Formatting: HTML provides tags for formatting text, including headings (<h1> to <h6>), paragraphs (<p>), emphasis (<em> and <strong>), lists (<ul>, <ol>, and <li>), and inline styling (<span> and <div>).
  4. Hyperlinks: HTML enables the creation of hyperlinks using the <a> (anchor) element, allowing users to navigate between different web pages by clicking on text or images.
  5. Images and Multimedia: HTML supports the embedding of images (<img>), audio (<audio>), video (<video>), and other multimedia content within web pages, enhancing the visual and interactive experience for users.
  6. Forms and Input Fields: HTML includes elements for creating interactive forms, such as text fields (<input type=”text”>), checkboxes (<input type=”checkbox”>), radio buttons (<input type=”radio”>), dropdown menus (<select>), and buttons (<button>), enabling user input and data submission.
  7. Accessibility Features: HTML provides features for enhancing web accessibility, including alt attributes for image descriptions, tabindex for specifying tab order, and ARIA roles for defining custom semantics for assistive technologies.
  8. Compatibility and Standards Compliance: HTML is governed by the World Wide Web Consortium (W3C), which establishes and maintains standards for web technologies. Browsers adhere to these standards to ensure compatibility and consistency in rendering HTML documents across different platforms and devices.

Basic Structure 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>Title of the Document</title>

</head>

<body>

    <header>

        <h1>Heading</h1>

    </header>

    <nav>

        <ul>

            <li><a href=”#”>Home</a></li>

            <li><a href=”#”>About</a></li>

            <li><a href=”#”>Contact</a></li>

        </ul>

    </nav>

    <main>

        <article>

            <h2>Article Title</h2>

            <p>Welcome to Dr Btaneja Website </p>

        </article>

    </main>

    <footer>

        <p>&copy; 2022 drbtaneja.com</p>

    </footer>

</body>

In this example:

  • The <!DOCTYPE html> declaration specifies the document type and version of HTML being used.
  • The <html> element is the root element of the HTML document.
  • The <head> section contains metadata about the document, such as character encoding, viewport settings, and the document title.
  • The <body> section contains the main content of the document, including headings, navigation links, articles, and footer information.

HTML is the foundation of web development, serving as the starting point for creating visually appealing, interactive, and accessible web pages and applications.