Coding with Sanjay Official

🎯 Welcome to Coding With Sanjay Official – CODING Seekhne Ki Pehli Seedhi Yahin Se Shuru Karein πŸ’»

Frontend & Functionality

Java Script

Coming SoonπŸ”’

Type Script

Coming SoonπŸ”’

Sunday, August 2, 2026

HTML Table Tag Practice Exercise (Basic to Advanced)

πŸ“– Introduction

Agar aapne HTML Table Tag Tutorial complete kar liya hai, to ab practice karne ka time hai. Sirf theory padhne se HTML nahi aati, balki regular practice karne se hi concepts clear hote hain aur coding skills improve hoti hain.

Is Article me aapko Basic se Advanced level tak ke HTML Table Practice Exercises milenge. Har Exercise ko is tarah design kiya gaya hai ki aap step by step Table banana, Rows aur Columns create karna, Headings add karna, colspan, rowspan, CSS Styling aur Real-Life Tables banana aasani se seekh saken.

Har Exercise ke saath ek Task, uska Solution Code aur Expected Output diya gaya hai. Pehle khud Exercise solve karne ki koshish karein, phir apna code diye gaye Solution se compare karein. Is tarah practice karne se aapka confidence bhi badhega aur coding mistakes bhi kam hongi.

Agar aap in sabhi Exercises ko complete kar lete hain, to aap HTML Tables ko real projects me use karne ke liye taiyar ho jayenge.


πŸ“š Is Article Me Aap Kya Seekhenge?

  • ✅ Basic HTML Table banana
  • ✅ Rows aur Columns create karna
  • ✅ Table Headings (<th>) ka use
  • ✅ Table Styling aur Borders
  • ✅ colspan aur rowspan ka practical use
  • ✅ Real-world Table Projects banana
  • ✅ Practice ke through HTML Table concepts ko strong karna

Agar aapne HTML Table tutorial complete kar liya hai, to ab practice karne ka time hai πŸ’ͺ Practice se hi aapka concept strong hota hai aur aap real projects bana paate ho.

HTML Table Practice Exercise Tutorial

πŸ‘‰ Neeche diye gaye exercises ko solve karke aap HTML table me master ban sakte ho πŸš€


πŸ§ͺ Exercise 1: Basic Table

Task: Ek simple table banao jisme ek cell ho aur usme "Hello World" likha ho.


<table border="1">
  <tr>
    <td>Hello World</td>
  </tr>
</table>
Expected Output:

Ek chhota table jisme ek box ho aur usme "Hello World" likha hoga.


πŸ§ͺ Exercise 2: Rows aur Columns

Task: 2 rows aur 2 columns ka table banao jisme HTML, CSS, JavaScript, React likha ho.


<table border="1">
  <tr>
    <td>HTML</td>
    <td>CSS</td>
  </tr>

  <tr>
    <td>JavaScript</td>
    <td>React</td>
  </tr>
</table>
Expected Output:

Ek table jisme 2 rows aur 2 columns ho aur har cell me ek technology ka naam hoga.


πŸ§ͺ Exercise 3: Table with Heading

Task: Ek table banao jisme heading ho (Name, Course, Marks) aur ek student ka data add karo.


<table border="1">
  <tr>
    <th>Name</th>
    <th>Course</th>
    <th>Marks</th>
  </tr>

  <tr>
    <td>Sanjay</td>
    <td>HTML</td>
    <td>95</td>
  </tr>
</table>
Expected Output:

Table ke top me headings dikhenge aur neeche student ka data show hoga.


πŸ§ͺ Exercise 4: Table Styling

Task: Ek table banao jisme full width ho aur border collapse use ho.


<table style="border-collapse:collapse; width:100%;" border="1">
  <tr>
    <th>Product</th>
    <th>Price</th>
  </tr>

  <tr>
    <td>Mobile</td>
    <td>10000</td>
  </tr>
</table>
Expected Output:

Table full width me dikhega aur borders clean aur joined honge.


πŸ§ͺ Exercise 5: Border CSS

Task: CSS ka use karke table, th aur td me border lagao.


<style>
table, th, td {
  border: 1px solid black;
}
</style>

<table>
  <tr>
    <td>Data</td>
  </tr>
</table>
Expected Output:

Table aur uske cells ke around black border dikhega.


πŸ§ͺ Exercise 6: Colspan

Task: Ek table banao jisme heading 2 columns me merge ho.


<table border="1">
  <tr>
    <th colspan="2">Student Info</th>
  </tr>

  <tr>
    <td>Name</td>
    <td>Sanjay</td>
  </tr>
</table>
Expected Output:

Heading 2 columns ke barabar space cover karegi.


πŸ§ͺ Exercise 7: Rowspan

Task: Ek table banao jisme ek cell 2 rows me merge ho.


<table border="1">
  <tr>
    <td rowspan="2">Sanjay</td>
    <td>HTML</td>
  </tr>

  <tr>
    <td>CSS</td>
  </tr>
</table>
Expected Output:

Ek cell vertically 2 rows tak stretch karega aur side me alag values dikhenge.


πŸ§ͺ Exercise 8: Real Table Project

Task: Ek product-price table banao jisme 2 ya 3 products ho.


<table border="1">
  <tr>
    <th>Product</th>
    <th>Price</th>
  </tr>

  <tr>
    <td>Laptop</td>
    <td>50000</td>
  </tr>

  <tr>
    <td>Mobile</td>
    <td>15000</td>
  </tr>
</table>
Expected Output:

Ek clean table jisme products aur unki price list organized form me dikhe.


πŸ”— Helpful Links


🎯 Conclusion

πŸ‘‰ Agar aapne ye sab exercises solve kar liye, to aap HTML table me strong ho gaye ho πŸ’ͺ πŸ‘‰ Next step: MCQ quiz solve karo aur apni knowledge test karo πŸš€

No comments:

Post a Comment