
The look of an HTML table can be greatly improved with CSS:
| Company | Contact | Country |
|---|---|---|
| Alfreds Futterkiste | Maria Anders | Germany |
| Berglunds snabbköp | Christina Berglund | Sweden |
| Centro comercial Moctezuma | Francisco Chang | Mexico |
| Ernst Handel | Roland Mendel | Austria |
| Island Trading | Helen Bennett | UK |
| Königlich Essen | Philip Cramer | Germany |
| Laughing Bacchus Winecellars | Yoshi Tannamuri | Canada |
| Magazzini Alimentari Riuniti | Giovanni Rovelli | Italy |
| North/South | Simon Crowther | UK |
| Paris spécialités | Marie Bertrand | France |
| The Big Cheese | Liz Nixon | USA |
| Vaffeljernet | Palle Ibsen | Denmark |
Example
table
{
border-collapse:collapse;
}
table,th, td
{
border: 1px solid black;
}
Example
table
{
width:100%;
}
th
{
height:50px;
}
td
{
text-align:right;
}
td
{
height:50px;
vertical-align:bottom;
}
td
{
padding:15px;
}
table, td, th
{
border:1px solid green;
}
th
{
background-color:green;
color:white;
}