Introduction to HTML

HTML (HyperText Markup Language) is the standard language for creating web pages. It provides the structure of a webpage, defining elements such as headings, paragraphs, links, and images.

          <!DOCTYPE html>
            <html>
             <head>
              <title>My First HTML Page</title>
             </head>
             <body>
              <h1>Welcome to HTML</h1>
              <p>This is my first paragraph.</p>
             </body>
      </html>
          
Basic HTML Structure

A simple HTML document consists of the following key components:

Example:

          <!DOCTYPE html>
      <html>
       <head>
        <title>Basic HTML Structure</title>
       </head>
       <body>
        <h1>Understanding HTML Layout</h1>
        <p>Each page follows a structured format.</p>
       </body>
      </html>
          
Common HTML Elements

HTML provides various elements to format content. Here are a few important ones:

Example:

          <h2>Example Elements</h2>
      <p>This is a paragraph.</p>
      <a href="https://www.example.com">Visit Example</a>
          
Lists in HTML

HTML supports both ordered and unordered lists:

Example:

          <ul>
           <li>Apple</li>
           <li>Banana</li>
           <li>Cherry</li>
      </ul>
          

Links and images help make web pages interactive:

Example:

          <a href="https://www.example.com">Click here</a>
      <img src="image.jpg" alt="A sample image">