Question

I have following html code:

<meta http-equiv="Content-type" content="text/html; charset=utf-8" />

<table border="1" style="width:300px">
  <tr>
    <td>Avaldus</td>
    <td>Staatus</td>
    <td>Kehtivusaeg</td>
  </tr>
  <tr>
    <td>Sõidutoetus<td>
    <td>Arvestatud<td>
    <td>kuni 1. jaanuarini</td>
  </tr>
</table>

When I look it in my browser it looks very bad, I want columns to be exactly under each other, so Sõidutoetus would be under Avaldus and Arvestatud under Staatus etc. But they are not. How could I make it right?

Was it helpful?

Solution

You need to use end tags to end your table cells.

The first two cells in the send row have start tags after them instead of end tags.

<td>Sõidutoetus<td> <!-- needs a / -->
<td>Arvestatud<td>  <!-- ditto -->

Alternatively, just omit them. End tags for table cells are optional in HTML.

<td>Sõidutoetus
<td>Arvestatud

OTHER TIPS

your code is wrong. You have not properly close the table columns. Use the below code.

 <table border="1" style="width:300px">
  <tr>
    <td>Avaldus</td>
    <td>Staatus</td>
    <td>Kehtivusaeg</td>
  </tr>
  <tr>
      <td>Sõidutoetus</td>
      <td>Arvestatud</td>
    <td>kunijaanuarini</td>
  </tr>
</table>
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top