HTML Exercise

Basic HTML Structure:

  • Create a new HTML document with the following structure:

    <!DOCTYPE html>
    <html lang="en">
    <head>
        <meta charset="UTF-8">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <title>My Web Page</title>
    </head>
    <body>
        <header>
            <h1>Welcome to My Web Page</h1>
        </header>
        <main>
            <section>
                <h2>About Me</h2>
                <p>This is a paragraph about me.</p>
            </section>
        </main>
        <footer>
            <p>&copy; 2024 My Web Page</p>
        </footer>
    </body>
    </html>
    
  1. Text Formatting:

    • Add the following elements to your HTML document:

      <p>This is a <strong>bold</strong> text and this is an <em>italic</em> text.</p>
      <ul>
          <li>First item</li>
          <li>Second item</li>
          <li>Third item</li>
      </ul>
      
  2. Links and Images:

    • Add a link and an image:

      <a href="<https://www.example.com>" target="_blank">Visit Example</a>
      <img src="<https://via.placeholder.com/150>" alt="Placeholder Image">
      
  3. Tables and Forms:

    • Create a simple table and form:

      <table>
          <tr>
              <th>Name</th>
              <th>Age</th>
          </tr>
          <tr>
              <td>Alice</td>
              <td>30</td>
          </tr>
          <tr>
              <td>Bob</td>
              <td>25</td>
          </tr>
      </table>
      
      <form action="/submit" method="post">
          <label for="name">Name:</label>
          <input type="text" id="name" name="name">
          <button type="submit">Submit</button>
      </form>
      

Help us improve the content 🤩

You can leave comments here.

Last updated