๐ 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
- ✅
colspanaurrowspanka 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.
๐ 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>
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>
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>
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>
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>
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>
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>
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>
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 ๐