Skip to content

Instantly share code, notes, and snippets.

@amelieykw
Created March 29, 2018 08:45
Show Gist options
  • Save amelieykw/97cc28b0f6fd7f42b94a90c85c8c630e to your computer and use it in GitHub Desktop.
Save amelieykw/97cc28b0f6fd7f42b94a90c85c8c630e to your computer and use it in GitHub Desktop.
[Html table - vertical/horizontal headings] #html #table #verticalHeading #horizontalHeading
<!DOCTYPE html>
<html>
<head>
<style>
table, th, td {
border: 1px solid black;
border-collapse: collapse;
}
th, td {
padding: 5px;
text-align: left;
}
</style>
</head>
<body>
<h2>Horizontal Headings:</h2>
<table style="width:100%">
<tr>
<th>Name</th>
<th>Telephone</th>
<th>Telephone</th>
</tr>
<tr>
<td>Bill Gates</td>
<td>555 77 854</td>
<td>555 77 855</td>
</tr>
</table>
<h2>Vertical Headings:</h2>
<table style="width:100%">
<tr>
<th>Name:</th>
<td>Bill Gates</td>
</tr>
<tr>
<th>Telephone:</th>
<td>555 77 854</td>
</tr>
<tr>
<th>Telephone:</th>
<td>555 77 855</td>
</tr>
</table>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment