For optimal formatting, it is recommended to separate each "substring" (number and operator) into its own table cell and apply text-align: center
to all cells. This will ensure that everything remains centered, regardless of the length of the number.
td {
text-align: center;
}
<table>
<tr>
<td>27.082</td>
<td> - </td>
<td>5</td>
<td> - </td>
<td>5</td>
</tr>
<tr>
<td>3.905</td>
<td> - </td>
<td>2</td>
<td> - </td>
<td>2</td>
</tr>
<tr>
<td>13.602</td>
<td> - </td>
<td>2</td>
<td> - </td>
<td>3</td>
</tr>
<tr>
<td>0</td>
<td> - </td>
<td>0</td>
<td> - </td>
<td>1</td>
</tr>
<tr>
<td>43715</td>
<td> - </td>
<td>513</td>
<td> - </td>
<td>312</td>
</tr>
</table>
Even with significant digit counts, proper alignment is maintained:
td {
text-align: center;
}
<table>
<tr>
<td>27.082</td>
<td> - </td>
<td>5</td>
<td> - </td>
<td>5</td>
</tr>
<tr>
<td>3.905</td>
<td> - </td>
<td>2</td>
<td> - </td>
<td>2</td>
</tr>
<tr>
<td>13.602</td>
<td> - </td>
<td>2</td>
<td> - </td>
<td>3</td>
</tr>
<tr>
<td>0</td>
<td> - </td>
<td>0</td>
<td> - </td>
<td>1</td>
</tr>
<tr>
<td>43750311251242145</td>
<td> - </td>
<td>5313451413</td>
<td> - </td>
<td>31434132</td>
</tr>
</table>