Organizing Data with
Tables using HTML AND CSS
HTML tables were created to provide a
straightforward way to mark up structured tabular data and to display that data
in a form that is easy for users to read and digest.
When HTML was
being developed, however, CSS was not widely supported in browsers, so tables
were the primary means by which websites were built. They were used for
positioning content as well as for building the overall layout of a page. This
worked at the time, but it was not what table markup was intended for, and it
led to many other associated problems.
Fortunately,
we have come a long way since then. Today tables are used specifically for
organizing data (like they should be), and CSS is free to get on with the jobs
of positioning and layout.
Building data
tables still has its challenges. How a table should be built in HTML depends
largely on the data and how it is to be displayed. Then, once they’re marked up
in HTML, tables need to be styled with CSS to make the information more legible
and understandable to users.
STEPS:
1. OPEN the notepad.
2. Inside the <section> element,
type the code:
<h2> 10 Places in Manila for all the Matcha
Lovers out there!<h2>
3. Then type the code for the data of the table.
4. To add border to the table:
change <table> to
<table=border"1">
-it will let border visble
HTML CODE:
<table>
<tr>
<th>Cafe Name</th>
<th>Location</th>
</tr>
<tr>
<td>Ikigai Kakigori Cafe</td>
<td>Ikigai Kakigori Café is at POS Building, Scout Mandriñan corner Tomas Morato Avenue, South Triangle, Quezon City.</td>
</tr>
<tr>
<td>Nomi Matcha</td>
<td>Nomi Matcha is at G/F W City Center, 30th Street corner 7th Avenue, Bonifacio Global City.</td>
</tr>
<tr>
<td>The Dessert Kitchen</td>
<td>The Dessert Kitchen is at 3/F Power Plant Mall, Rockwell, Makati City, G/F Robinsons Place Ermita, Ermita, Manila, and G/F UP Town Center, Katipunan, Quezon City.</td>
</tr>
<tr>
<td>Scout's Honor</td>
<td>Scout’s Honor is at Hole in the Wall, 4/F Century City Mall, Makati City; and G/F Ayala Malls Vertis North, Quezon City.</td>
</tr>
<tr>
<td>Kiss The Tiramisu</td>
<td>Kiss The Tiramisu is at Three Central, Valero Street, Makati City.</td>
</tr>
<tr>
<td>Zaan Japanese Tea House</td>
<td>Zaan Japanese Tea House is at G/F Norfil Foundation Building, 16 Mother Ignacia Avenue corner Don A. Roces Avenue, Quezon City.
</td>
</tr>
<tr>
<td>Saint Marc Café</td>
<td>Saint Marc Café is at G/F, SM Mega Fashion Hall, SM Megamall EDSA
Manila, Philippines</td>
</tr>
<tr>
<td>Le Petit Soufflé</td>
<td> Le Petit Soufflé is at 2nd Floor, Mega Fashion Hall, SM Megamall, Ortigas, Mandaluyong City</td>
</tr>
<tr>
<td>UCC Clockwork</td>
<td> UCC Clockwall is at Bluebay Walk, EDSA Corner Diosdado Macapagal Boulevard
Manila, Philippines 1604</td>
</tr>
<tr>
<td>Tsujiri</td>
<td>Tsujiri is at SM Aura, Manila Philippines.</td>
</tr>
</table>
OUTPUT:
