Consider the following html file:
<!DOCTYPE html>
<html>
<head>
<title>Test of table</title>
<style type="text/css">
p {text-align:justify;}
li {text-align:justify;}
ins {background-color:#A0FFA0;}
del {background-color:#FFA0A0;}
.code {background-color:#EEEEEE;}
.codex {background-color:#FFFFE0;}
.custom-table {
text-align:center;
font-family:monospace;
}
</style>
</head>
<body>
<table border="1" class="custom-table">
<tr>
<th></th>
<th>First column</th>
<th>Second column</th>
<th>Third column</th>
</tr>
<tr>
<td>First row</td>
<td>1</td>
<td>2</td>
<td>3</td>
</tr>
<tr>
<td>Second row</td>
<td>2</td>
<td>4</td>
<td>6</td>
</tr>
<tr>
<td>Third row</td>
<td>3</td>
<td>6</td>
<td>9</td>
</tr>
</table>
</body>
</html>
I would like the First column
, Second column
, Third column
(or in other words, all the th
elements of the custom-table
) texts to be non-bold, vertically written (+90° rotation counter-clockwise), vertically centered and horizontally centered within header cells. How to do that by modifying this document?
Note: I don't need backward compatibility with non-html5 browsers, I don't want javascript, and I don't want an external CSS.
Here is an example of the kind of alignment I want: