Build an "About Taj Mahal" Webpage Using HTML & CSS | Beginner-Friendly Project



Introduction

When we begin our journey in web development, one of the best ways to learn is by building small, meaningful projects. Instead of only learning theory, we should apply our knowledge practically. In this article, we will build a complete "About Taj Mahal" webpage using HTML and CSS, which is perfect for beginners.

This project will help us understand how real-world webpages are structured and styled. By the end of this tutorial, we will have a clean, simple, and responsive webpage that showcases information about the Taj Mahal. 


Why We Should Build This Project

Before jumping into the code, let’s understand why this project is useful for us.

  • It helps us practice basic HTML structure
  • We learn how to apply CSS styling
  • We understand how to display images, text, lists, and tables
  • It improves our confidence by building a real-world mini project

If we are just starting with HTML and CSS, this project is a perfect hands-on exercise.


What We Will Learn

In this tutorial, we will learn:

  • How to structure a webpage using HTML elements
  • How to style content using CSS properties
  • How to add and align images properly
  • How to create lists and tables
  • How to design a clean and readable layout


Project Overview

In this project, we will create a simple webpage that includes:

  • A main heading (Title of the page)
  • An image of the Taj Mahal
  • A detailed introduction section
  • Key points about the Taj Mahal
  • A table with basic information
  • Clean and minimal styling using CSS

This structure will help us understand how most informational websites are built.


Complete Source Code

Let’s now move step-by-step and write the complete code.

HTML Code

We will first create the structure of our webpage using HTML.

<!doctype html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>About Taj Mahal</title>
    <link rel="stylesheet" href="./index.css" />
  </head>
  <body>
    <div class="container">
      <div class="subContainer">
        <div class="tajImage"><img src="./photo.jpeg" /></div>
        <h1>Taj Mahal</h1>
        <div>
          <h2>Introduction</h2>
          <p>
            The <b>Taj Mahal</b> is one of the most famous monuments in the
            world and a symbol of love. It is located in
            <b> Agra, Uttar Pradesh, India,</b> on the banks of the Yamuna
            River. This magnificent white marble monument was built by the
            Mughal emperor Shah Jahan in memory of his beloved wife Mumtaz
            Mahal.
          </p>
          <p>
            Construction of the Taj Mahal began in <b>1632 AD</b> and was
            completed in <b>1653 AD.</b> It took nearly 22 years and the efforts
            of around 20,000 artisans and craftsmen from India, Persia, and
            other regions. The monument was built as a <i>mausoleum</i> to house
            the tomb of Mumtaz Mahal, who died during childbirth.
          </p>
          <p>
            The Taj Mahal is often called the
            <b>“Monument of Eternal Love.” </b>Shah Jahan’s deep love for Mumtaz
            Mahal is reflected in the beauty and symmetry of the structure. Even
            today, it represents devotion, romance, and emotional bonding,
            attracting millions of visitors from across the world.
          </p>
        </div>
        <div>
          <h2>Key Points about the Taj Mahal</h2>
          <ul>
            <li>Located in <b>Agra, Uttar Pradesh</b></li>
            <li>Built by <b>Shah Jahan</b></li>
            <li>Dedicated to <b>Mumtaz Mahal</b></li>
            <li>Construction period: <b>1632 – 1653</b></li>
            <li>Made of <b>white marble</b></li>
          </ul>
        </div>
        <div>
          <h2>Basic Information about the Taj Mahal</h2>
          <table border="1" cellspacing="0" cellpadding="10" width="500px">
            <thead>
              <tr>
                <th>Feature</th>
                <th>Details</th>
              </tr>
            </thead>
            <tbody>
              <tr>
                <td>Monument Name</td>
                <td>Taj Mahal</td>
              </tr>
              <tr>
                <td>Location</td>
                <td>Agra, Uttar Pradesh, India</td>
              </tr>
              <tr>
                <td>Built By</td>
                <td>Shah Jahan</td>
              </tr>
              <tr>
                <td>Built For</td>
                <td>Mumtaz Mahal</td>
              </tr>
              <tr>
                <td>Construction Period</td>
                <td>1632 – 1653</td>
              </tr>
            </tbody>
          </table>
        </div>
      </div>
    </div>
  </body>
</html>

CSS Code

Now, we will style our webpage using CSS to make it visually appealing.

body {
  background-color: rgb(188, 246, 188);
}
.container {
  width: 60%;
  margin: auto;
}
.subContainer {
  background-color: #ffffff;
  border: 1px solid #d6cfc4;
  padding: 20px;
}
.tajImage {
  text-align: center;
}
.tajImage img {
  width: 250px;
  height: 250px;
}
p,
li,
td {
  color: #333333;
}
h1,
h3 {
  color: #4e342e;
}


Understanding the Code

Let’s quickly understand what we have done:

  • We used HTML to create the structure of the webpage
  • We used <div> elements to organize content into sections
  • We added an image using the <img> tag
  • We used <ul> and <li> for listing key points
  • We created a table using <table>, <tr>, <td>, and <th>
  • We applied CSS styling to improve layout, colors, and spacing

This is exactly how basic websites are designed in real-world scenarios.


Final Output

After combining the HTML and CSS code, we will get a clean and simple webpage that displays:

  • A centered image
  • Well-structured content
  • Styled headings and text
  • Organized list and table

This gives us a strong foundation in webpage design.





Try It Yourself

To improve our skills further, we can experiment with this project:

  • Change the background colors
  • Add more sections like History or Tourism
  • Use different fonts and styles
  • Make the page responsive using media queries

Practicing these changes will help us learn faster.


Conclusion

In this tutorial, we built a complete "About Taj Mahal" webpage using HTML and CSS. This project is simple, beginner-friendly, and very useful for practicing core web development concepts.

By working on small projects like this, we can gradually improve our skills and gain confidence. The more we practice, the better we become at designing and building real-world websites.


📚 Explore Full Series

Continue learning step by step from our complete roadmap click the link below:
👉 HTML & CSS Learning Series


What’s Coming Up Next?

In the next part of this series, we will build a Visiting Card Design using HTML and CSS. This project will help us understand layout design, alignment, and styling in more depth.

Stay tuned and keep practicing 🚀


Follow for More

If you’re interested in learning HTML, CSS, React, and MERN Stack,

stay connected for more beginner-friendly tutorials and real-world projects.
















Comments

Popular posts from this blog

Complete HTML Layout Tutorial for Beginners (With Examples & Explanation)

HTML Tags and Attributes Explained (Beginner Guide with Form Examples)

Most Commonly Used HTML Tags (Beginner-Friendly Guide)