Вопрос

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?

Это было полезно?

Решение

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

Другие советы

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>
Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top