HOW TO CREATE TABLES USING HTML AND CSS
On this blog you will also learn various things like:
- How to add borders.
- How to specify the cell padding, spacing, alignment.
- How to insert image inside the table.
1. First step is to OPEN the notepad.
2. Inside the <section> element, type the code:<h2>Best attractions in Singapore</h2>
3. Then type the code for the data of the table.
HTML CODE:
<table>
<tr>
<td rowspan="2"></td>
<th>Marina Bay</th>
<th>Clarke Quay</th>
<th>Universal Studios</th>
<th>Gardens By the Bay</th>
<th>Raffles Hotel</th>
</tr>
<tr>
<td>SG</td>
<td>SG</td>
<td>SG</td>
<td>SG</td>
<td>SG</td>
</tr>
<tr>
<td>Information</td>
<td>
Marina
Bay in Singapore has
undergone a transformation of epic proportions. Once a quiet body of water at
the entrance of the Singapore River, this area now stands as a spectacular
example of how this miniscule country has come to be one of the world’s most
luxurious travel destinations. Overlapping the Financial District, Clarke
Quay and the central Civic District towards the north, Marina Bay boats some of
Singapore’s most iconic hotels, skyscrapers, and attractions. It difficult to
ignore the iconic Marina Bay Sands resort too, which itself is home to a
substantial list of great things to do and see. This section is your guide to
Marina Bay; from all the best hotels to restaurants, shopping, nightlife and
attractions – we’ve got it all!
</td>
<td>Nightlife
in Clarke Quay is
what this party hub of Singapore is really famous. Dazzling lights, beautiful
people and buzzing nightclubs – these are some of the things that imprint
themselves on your mind the first time you visit Clarke Quay, Boat Quay and a
kaleidoscope of concept bars and pubs along the Singapore River. A
mind-boggling selection of themes and attractions round out your choice of
after-sunset indulgence. Originally a centre of commerce along the Singapore
River, Clarke Quay is nowadays a labyrinth of restaurants, concept bars, retail
stores and recreation outlets. Try Bar Cocoon or Bamboo Bar at The Forbidden
City, Lunar Asian Fusion Bar for great shows, or Bar Opiume at the Empress
Place by the riverside and then Attica or Canvas for an after-hours rave.
This comprehensive Clarke Quay nightlife section has all the best bars, pubs
and clubs to hit.
</td>
<td>Universal
Studios Singapore was the latest
addition to Singapore’s attractions list. Opened in 2010, Universal
Studios Singapore has seven themed sections with countless rides and shows,
all related to major hit movies. The park is part of the US$4.5 billion Resorts
World Sentosa Development. Start off in Hollywood. Strolling down Hollywood
Boulevard will make you think that you’re in the States, not in a tropical
Asian country. This is the main shopping area of the park. New York is based of
course on the city of New York and here you can have your photo snapped with
‘movie stars’ such as Charlie Chaplin and Marilyn Monroe. Continue on to Sci-Fi
city featuring a pair of the world’s tallest intertwining roller coasters among
other things and then to Ancient Egypt where you will be faced with two massive
guard statues. The atmosphere is truly that of ancient Egypt so get in to
experience the ‘Revenge of the Mummy’ ride, a must for adults but not quite the
best thing for young kids.
</td>
<td>Gardens
by the Bay is a huge, colourful,
futuristic park in the bay area of Singapore. The famous Supertree structures
offer an impressive skywalk over the gardens, over-sized seashell-shaped
greenhouses recreate chilly mountain climates and there are hundreds of trees
and plants to discover, making this destination great fun for both kids and
adults. The best place to grasp the size of Gardens by the Bay is from the top
of Marina Bay Sands, which sits directly opposite the park, the space encompass
250 acres of reclaimed land on the waterfront. Getting here is easy, either via
walkways from the hotel, giving you an elevated view of the gardens, or taking
the slightly longer riverside promenade to enter the park near the two domes.
Walking around the park won’t cost you a cent but if you want to step inside
the climate-controlled conservatories, or walk amongst the Supertrees, there is
a fee. The main park area is open from 9:00 to 21:00.
</td>
<td> The Raffles
Hotel, a luxurious
colonial-style hotel has a long history dating back to 1887 and has become one
of the most important Singapore landmarks. Among famous guests are Elizabeth
Taylor, Queen Elizabeth II and the late King of Pop, Michael Jackson. The
Raffles Hotel features 103 suites and 18 distinctive restaurants and bars as
well as an arcade with over 40 boutiques and stores (think Louis Vuitton and
Tiffany & Co.) Many come for the Raffles Bar experience and you can be sure
to enjoy the best Singapore Sling in town. After all, it was invented here and
they’ve had almost 100 years of experience at making them.
</td>
</td>
</tr>
</table>
4. To add borders to the table, type the css code: table{border-style:none;} td{border-style:solid; border-width:1px; border-color:gray;} th{border-style:solid; border-width:1px; border-color:gray;} as an internal stylesheet inside the style tag with the attribute: type="text/css". -after adding the css code add the attribute: cellspacing="0".
5. To specify the cell alignment, padding, and spacing: inside the tags just add the following attributes: cellpadding, padding, cellspacing, align, valign, and etc... For our table output add the following css codes inside the <style> tag: th{width:130px; height:30px; padding:5px;} .td1{width:130px; height:30px; padding:5px; text-align:center; vertical-align:middle;} .sg{height:30px; padding:3px;}
6. Insert the class="sg" to the second row of the table: <tr> <tr> <td class="sg">SG</td><td class="sg">SG</td>
<td class="sg">SG</td>
<td class="sg">SG</td>
<td class="sg">SG</td>
</tr>
7. Insert class="td1" to the other rows similar to this: <tr>
<td class="td1">Information</td>
<td class="td1">Information</td>
<td class="td1">Marina Bay in Singapore has undergone a transformation of epic proportions. Once a quiet body of water at the entrance of the Singapore River, this area now stands as a spectacular example of how this miniscule country has come to be one of the world’s most luxurious travel destinations. Overlapping the Financial District, Clarke Quay and the central Civic District towards the north, Marina Bay boats some of Singapore’s most iconic hotels, skyscrapers, and attractions. It difficult to ignore the iconic Marina Bay Sands resort too, which itself is home to a substantial list of great things to do and see. This section is your guide to Marina Bay; from all the best hotels to restaurants, shopping, nightlife and attractions – we’ve got it all!</td>
<td class="td1">Nightlife in Clarke Quay is what this party hub of Singapore is really famous. Dazzling lights, beautiful people and buzzing nightclubs – these are some of the things that imprint themselves on your mind the first time you visit Clarke Quay, Boat Quay and a kaleidoscope of concept bars and pubs along the Singapore River. A mind-boggling selection of themes and attractions round out your choice of after-sunset indulgence. Originally a centre of commerce along the Singapore River, Clarke Quay is nowadays a labyrinth of restaurants, concept bars, retail stores and recreation outlets. Try Bar Cocoon or Bamboo Bar at The Forbidden City, Lunar Asian Fusion Bar for great shows, or Bar Opiume at the Empress Place by the riverside and then Attica or Canvas for an after-hours rave. This comprehensive Clarke Quay nightlife section has all the best bars, pubs and clubs to hit.</td>
<td class="td1">Universal Studios Singapore was the latest addition to Singapore’s attractions list. Opened in 2010, Universal Studios Singapore has seven themed sections with countless rides and shows, all related to major hit movies. The park is part of the US$4.5 billion Resorts World Sentosa Development. Start off in Hollywood. Strolling down Hollywood Boulevard will make you think that you’re in the States, not in a tropical Asian country. This is the main shopping area of the park. New York is based of course on the city of New York and here you can have your photo snapped with ‘movie stars’ such as Charlie Chaplin and Marilyn Monroe. Continue on to Sci-Fi city featuring a pair of the world’s tallest intertwining roller coasters among other things and then to Ancient Egypt where you will be faced with two massive guard statues. The atmosphere is truly that of ancient Egypt so get in to experience the ‘Revenge of the Mummy’ ride, a must for adults but not quite the best thing for young kids.</td>
<td class="td1">Gardens by the Bay is a huge, colourful, futuristic park in the bay area of Singapore. The famous Supertree structures offer an impressive skywalk over the gardens, over-sized seashell-shaped greenhouses recreate chilly mountain climates and there are hundreds of trees and plants to discover, making this destination great fun for both kids and adults. The best place to grasp the size of Gardens by the Bay is from the top of Marina Bay Sands, which sits directly opposite the park, the space encompass 250 acres of reclaimed land on the waterfront. Getting here is easy, either via walkways from the hotel, giving you an elevated view of the gardens, or taking the slightly longer riverside promenade to enter the park near the two domes. Walking around the park won’t cost you a cent but if you want to step inside the climate-controlled conservatories, or walk amongst the Supertrees, there is a fee. The main park area is open from 9:00 to 21:00.</td>
<td class="td1">The Raffles Hotel, a luxurious colonial-style hotel has a long history dating back to 1887 and has become one of the most important Singapore landmarks. Among famous guests are Elizabeth Taylor, Queen Elizabeth II and the late King of Pop, Michael Jackson. The Raffles Hotel features 103 suites and 18 distinctive restaurants and bars as well as an arcade with over 40 boutiques and stores (think Louis Vuitton and Tiffany & Co.) Many come for the Raffles Bar experience and you can be sure to enjoy the best Singapore Sling in town. After all, it was invented here and they’ve had almost 100 years of experience at making them.</td>
</tr>
niceee
ReplyDeleteWow!
ReplyDeleteAmazing!
ReplyDeleteNice
ReplyDeleteWow!!!! Nice nice! Amazing!!!
ReplyDeleteSo Fascinating.
ReplyDeleteAmaziiing!
ReplyDeleteWowowowowowow
ReplyDeleteNicee!!!🖒🖒
ReplyDeleteI❤️SG����
ReplyDeleteWow!!
ReplyDeletewow... amazing
ReplyDeletei really wanna go to singapore even at least once in my life....
ReplyDeletenami nami
ReplyDeleteI know right?
DeleteSG NUMBA1
ReplyDeleteCan't wait to go back! ��������
ReplyDeleteGusto ko magbalik singapore ba
ReplyDeleteMe too HAHAHAHA
DeletePhilippines next
ReplyDeleteTae hahahaha
DeleteWow amazing
ReplyDeleteAmazing��
ReplyDeleteNice
ReplyDeleteWOOOOOOW!!!
ReplyDeleteYou gave me reasons to love this country more!!!
ReplyDeleteCool!!
ReplyDeleteNice destination !
ReplyDeleteGo there someday
DeleteBest tourists spot
ReplyDeleteGreat choice
ReplyDeleteTwo thumbs up for this fantastic place!
ReplyDelete4 thumbs up instead hahaha
DeletePLANNING TO GO HERE NEXT YEAR AGAIN :)
ReplyDeleteAnd by the way... SG has the best friedrice. Yummmerssss
ReplyDeleteAnd also DOLLAR VALUE shopping spreeee. Hehehe love that store can buy soooooo many chocolates that costs a dollar only, yey
ReplyDeleteHAHHAHAHA ABSOLUTELY!
Deletewow, admirable!!
ReplyDeleteAdmirable gid ya🤣
DeleteThis comment has been removed by the author.
DeleteWoah amazing
ReplyDeleteI should visit this kind of places
ReplyDeleteYou should now na!
DeleteI've learned a lot about sg now
ReplyDeleteSalamat sa blog
ReplyDeleteNew info in another country gained🤟
ReplyDeleteGlad I could help hihi
DeleteI love SG so muh
ReplyDeleteI'm here only for reference��
ReplyDeleteI'm glad I could help
DeleteAmazing SG❤
ReplyDeleteAwesome
ReplyDeleteThanks
DeleteSG❤
ReplyDeleteNow i have ideas where to go whenever i'll visit SG someday😆👍
ReplyDeleteHahaha glad I could help
DeleteNice
ReplyDeletewoah!
ReplyDeleteWhat?? HAHAHA
DeleteWaaahhh this makes me wanna go to SG too❤️❤️
ReplyDeleteG na! Hahaha no-visa required pa man ang SG
Deletewow
ReplyDeleteNice right?
Deletethis place is amazing!
ReplyDeleteYes they're the almost perfect country
Deletei should visit Singapore!
ReplyDeletethanks for these! i love it
ReplyDeleteTHANKS FOR THESE I LOVE IT
ReplyDeleteTHANKS FOR THESE I LOVE IT
ReplyDeleteI LOVE IT THESE IS SO NICE! AMAZING AND AWESOME!
ReplyDeletenice
ReplyDeleteAmazing right? Nerdy??
DeleteAmazing
ReplyDeleteNice
ReplyDeleteGoodluck josh
DeleteWow i have an idea if I want to go to singapore,where best destinations gives me a nice and positive vibes
ReplyDeleteHelpful?
DeleteNice work
ReplyDeleteNice work
ReplyDeletewow
ReplyDeleteNice Dude!
ReplyDeleteAmazinggggg
ReplyDeletewow! tnx for the info.
ReplyDeleteI know right?
ReplyDeletewow
ReplyDeletegreat
ReplyDeleteCongrats 👏
ReplyDeletethis is nice 👍🏻
ReplyDeleteWow! I was really impressed! This blog is great, i will go to singapore if given a chance. Hahaha
ReplyDeleteYou will someday! hahah
DeleteAmazing
ReplyDeleteWoooow!
ReplyDeleteThis place is amazinggg!
ReplyDeleteWow !
ReplyDeleteGreat place isn't it?
DeleteWow interesting blog
ReplyDeleteThanks man
Deleteamazing
ReplyDeletethe places where i want to travel:)
ReplyDeleteIt is nice to see the beautiful places in Singapore
ReplyDeleteNice
ReplyDeleteAside from KOREA, I really want to go @SG 😍 If there will be a budget and given a chance... HAHAHA I'll visit those places featured here 😉
ReplyDeleteI'm glad i made u remember a place you'd want to go to someday. I'm glad u liked it.
DeleteThanks
ReplyDeleteSingapore 🤩
ReplyDeleteSG🤩😍
DeleteWew
ReplyDeleteMindblowned?🤣
ReplyDeleteThanks for the information
ReplyDeleteThank you! It was really helpful
ReplyDeleteI'd like to learn moree!!
ReplyDeleteMoreee!! ASAP
ReplyDelete