Introduction to HTML: The Structure of Web Pages

Chapter: Introduction to Web Design

M2R5 / introduction-to-web-design

Overview

Get started with HTML, the foundational language for creating the structure and content of all web pages.

HTML stands for Hypertext Markup Language. It is the standard markup language used for creating web pages and web applications. HTML describes the structure of a web page semantically and originally included cues for the appearance of the document.

What is HTML?

  • It's a markup language, not a programming language. It uses tags to define elements within a document.
  • It forms the backbone of every web page, providing the structure and content.
  • It defines the meaning and purpose of content, such as headings, paragraphs, images, and links.

Basic HTML Structure:

<!DOCTYPE html>
<html>
  <head>
    <title>My First Web Page</title>
  </head>
  <body>
    <h1>Welcome to HTML</h1>
    <p>This is a paragraph of text.</p>
    <a href="https://www.nielit.gov.in/">Visit NIELIT</a>
  </body>
</html>
  • <!DOCTYPE html>: Declares the document type and HTML version.
  • <html>: The root element of an HTML page.
  • <head>: Contains meta-information about the HTML document (e.g., title, character set, links to CSS). This content is not displayed on the page.
  • <title>: Specifies the title of the web page, which appears in the browser tab or window title bar.
  • <body>: Contains all the visible content of the web page, such as headings, paragraphs, images, links, etc.

Common HTML Elements:

  • <h1> to <h6>: Heading tags, with <h1> being the most important.
  • <p>: Paragraph tag for blocks of text.
  • <a>: Anchor tag for creating hyperlinks.
  • <img>: Image tag for embedding images.
  • <ul>, <ol>, <li>: Unordered lists, ordered lists, and list items.
  • <div>, <span>: Generic container elements for grouping content.

HTML provides the fundamental framework upon which all other web technologies are built.

Exam Tip:

Understand the basic structure of an HTML document and the purpose of common tags like <html>, <head>, <body>, <h1>, <p>, and <a>.