Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

TD can't be nested inside TABLE

I just noticed that I get the following warning/error from VS.

Validation (XHTML 1.0 Transitional): Element 'td' cannot be nested within element 'table'

I dare to claim that the element TD can too be nested inside TABLE. In fact, I say that it's the only correct way to use TD. What am I missing?

I've double and triple checked - no TD is nested inside any other TD. They're just inside TR which is inside TABLE.

EDIT

<table>
  <td></td>
  @foreach (String t in ts)
  { <td>@t</td> }
  @foreach (String s in ss)
  {
    <tr>
      <td>...</td>
      @foreach (String t in ts)
      { <td>...</td> }
    </tr>
  }
</table>
like image 489
Konrad Viltersten Avatar asked Oct 21 '25 04:10

Konrad Viltersten


1 Answers

The error suggests you are trying to do this:

<table>
    <td>...</td>
...

but tds must be nested in trs like this:

<table>
    <tr>
        <td>...</td>
    </tr>
...

If you are already doing this, then you will need to show the HTML. Without seeing the HTML we can only guess...

like image 161
Darko Z Avatar answered Oct 23 '25 19:10

Darko Z



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!