How to create a table
How to Create a table
On this blog you will also learn how to create multiple rows in a table, create tables with heading, how to merge table cells, and how to specify column width.
Steps on how to create a one row table.
1. Open Notepad.
2. Type the following code below in HTML:
<table>
<tr>
<td>Cell(2)</td>
<td>Cell2</td>
<td>Cell2</td>
</tr>
</table>
2. Type the following code below in HTML:
<table border="1">
<tr>
<td> Row 1 Cell 1</td>
<td> Row 1 Cell 2</td>
<td> Row 1 Cell 3</td>
</tr>
<tr>
<td> Row 2 Cell 1</td>
<td> Row 2 Cell 2</td>
<td> Row 2 Cell 3</td>
</tr>
<tr>
<td> Row 3 Cell 1</td>
<td> Row 3 Cell 2</td>
<td> Row 3 Cell 3</td>
</tr>
</table>
OUTPUT:
Steps on how to create tables with a heading:
1. Open Notepad.
2. Type the following codes structure in HTML:
<table border="1">
<tr>
<th>Heading 1</th>
<th>Heading 2</th>
<th>Heading 3</th>
</tr>
<tr>
<td> Row 2 Cell 1</td>
<td> Row 2 Cell 2</td>
<td> Row 2 Cell 3</td>
</tr>
<tr>
<td> Row 3 Cell 1</td>
<td> Row 3 Cell 2</td>
<td> Row 3 Cell 3</td>
</tr>
</table>
Steps on how to merge Columns as one in a table.
1. Open Notepad.
2. Insert the attribute colspan="n", where n is the number of columns to be united
<table border="1">
<tr>
<th colspan="3">Heading1</th>
</tr>
<tr>
<td> Row 2 Cell 1</td>
<td> Row 2 Cell 2</td>
<td> Row 2 Cell 3</td>
</tr>
<tr>
<td> Row 3 Cell 1</td>
<td> Row 3 Cell 2</td>
<td> Row 3 Cell 3</td>
</tr>
<tr>
</table>
OUTPUT:
Steps on how to merge Rows as one in a table.
1. Open notepad.
2. Insert the attribute rowspan="n", where n is the number of rows to be united.
<table border="1">
<tr>
<th colspan="3">Heading 1</th>
</tr>
<tr>
<td rowspan="2">Row span</td>
<td> Row 2 Cell 1</td>
<td> Row 2 Cell 2</td>
</tr>
<tr>
<td> Row 3 Cell 1</td>
<td> Row 3 Cell 2</td>
</tr>
</table>
OUTPUT:
Steps on how to specify column width.
1. Open Notepad.
2. Type <td width="n">, where n is the size value of the column width, similar to this:
<table border="1">
<tr>
<th colspan="3">Heading 1</th>
</tr>
<tr>
<td rowspan="2"> Row span</td>
<td width="20%"> Row 2 Cell 1</td>
<td width="70"> Row 2 Cell 2</td>
</tr>
<tr>
<td> Row 3 Cell 1</td>
<td> Row 3 Cell 2</td>
</tr>
</table>
Exercise on how to create a table
1. Open weatherforcast.html files in your PracticeFile-C5l13 folder in Notepad.
2. Type code below inside the <section> element:
<h2>5 Day Weather Forecast</h2>
3. Type the following code below for the weather forcast data:
<h2>5 Day Weather Forecast </h2>
<table>
<tr>
<td rowspan="2"></td>
<th>Monday</th>
<th>Tuesday</th>
<th>Wednesday</th>
<th>Thursday</th>
<th>Friday</th>
</tr>
<tr>
<td>Sunny</td>
<td>Partly Cloudy</td>
<td>Mostly Sunny</td>
<td>Cloudy</td>
<td>Sunny</td>
</tr>
<tr>
<td>Temp.</td>
<td>31°</td>
<td>29°</td>
<td>30°</td>
<td>26°</td>
<td>32°</td>
</tr>
<tr>
<td>Winds</td>
<td>SW @ 10mph</td>
<td>NE @ 11mph</td>
<td>SE @ 10mph</td>
<td>NW @ 9mph</td>
<td>SW @ 10mph</td>
</tr>
<tr>
<td>Chances of<br>Rain</td>
<td>0%</td>
<td>65%</td>
<td>20%</td>
<td>90%</td>
<td>2%</td>
</tr>
<tr>
<td>Sunrise</td>
<td>5:30AM</td>
<td>6:00AM</td>
<td>5:25AM</td>
<td>6:15AM</td>
<td>5:45AM</td>
</tr>
<tr>
<td>Sunset</td>
<td>6:00PM</td>
<td>5:45PM</td>
<td>6:15PM</td>
<td>5:40PM</td>
<td>6:25PM</td>
</tr>
</table>







Dream cars! Damn🔥🔥
ReplyDeleteAMAZING!
ReplyDeleteOnly the richest person can buy all of that
ReplyDeleteWow!!!
ReplyDeleteWaw
ReplyDeleteWish I could have one!
ReplyDeleteplease santa give me this car
ReplyDeleteBloody hell...wish to have one!
ReplyDeleteCool!!
ReplyDeleteInteresting!
ReplyDeleteWowww kalain
ReplyDeleteVery interesting, hope to have one
ReplyDeleteamazing!
ReplyDeletewhere can I steal those cars? Hehe
ReplyDeleteSo amazing😔 but too expensive
ReplyDeletenice
ReplyDeletevery good
ReplyDeletewow!
ReplyDeletegood looking cars, just like me.
ReplyDeleteWow nice cars
ReplyDeleteAmazing
ReplyDeleteReally need to work hard to get one of these.
ReplyDeleteO really?😂
DeleteHmmm nice!!
ReplyDeleteDope 100%
ReplyDeleteDope 100%
ReplyDeleteReading this makes me wanna think on how can people afford this kind of luxury? Exquisite Cars though.
ReplyDeletenice cars :)
ReplyDeletepwed na ni pang training!
ReplyDeleteWow
ReplyDeletewow!
ReplyDeleteThese are cooooool! 😆👍
ReplyDeleteNice cars!
ReplyDeleteThis for my birthday please
ReplyDeletenice
ReplyDeleteI wish I have that kind of a car
ReplyDeleteChard naka comment nako si vince ni so comment Ka na din
ReplyDeletehttps://m.facebook.com/story.php?story_fbid=2239186132790929&id=100000986925223
Chard naka comment nako si vince ni so comment Ka na din
ReplyDeletehttps://m.facebook.com/story.php?story_fbid=2239186132790929&id=100000986925223
So expensive
ReplyDeletethey're so amazing!
ReplyDeleteAmazing cars!!
ReplyDeleteWow! Amazing!
ReplyDeleteDreaming to have one of these cars soon. 😉 If I win on the Lottery 😂😂😂
ReplyDeletecool :-D
ReplyDeleteWow!
ReplyDeleteWow!very informative!
ReplyDeleteThis blog gives me some ideas in what car i should buy😍 thankyou for this kind information about cars
ReplyDeleteThis cars are so expensive!
ReplyDeleteNice
ReplyDeleteThis are the list of cars I cannot afford
ReplyDeleteWow!
ReplyDeleteLuxurious cars so lit🔥
ReplyDeleteWow!! Amazing!!
ReplyDeletewow
ReplyDeleteWow!
ReplyDeleteCodes😂👍
ReplyDelete