Neil Porven
Neil Porven

Reputation: 83

Unexpected end tags

I have a message the appears in W3 Validator and also if I press F12 key tool on IE.

HTML1504: Unexpected end tag.
index_phaseII_v02.html, line 459 character 14
HTML1504: Unexpected end tag.
index_phaseII_v02.html, line 460 character 11
HTML1504: Unexpected end tag.
index_phaseII_v02.html, line 472 character 13
HTML1504: Unexpected end tag.
index_phaseII_v02.html, line 473 character 11

here is a snippet starting in line 449 to 461

449 <table>
450          <tr>
451            <th>Location Name</th>
452          </tr>
453          <tr>
454             <td>
455               <input id="variable13" name="Nb_var13" type="text" size="80" maxlength="35"     value="Welcome to Hialeah">
456               <tr>
457                 <td><label id="Location"></label></td>
458               </tr>
459             </td>     
460          </tr>
461       </table>     

Here is the other snippet of code, where the other warning is found:

462  <table>
463          <tr>
464            <th>Welcome Message</th>
465          </tr>
466          <tr>
467            <td>
468               <input id="variable58" name="Nb_var58" type="text" size="80" maxlength="23" value="     Please Drive ">
469               <tr>
470                 <td><label id="Welcome"></label></td>
471               </tr>
472            </td>
473          </tr>
474       </table>

I am not sure why this warnings are being issued, it seems I am opening and closing things properly, maybe someone can see different.

Thank you, Neil Porven

Upvotes: 0

Views: 7360

Answers (3)

Neil Porven
Neil Porven

Reputation: 83

Ok, I fixed it! Here is what I did:

449   <table>
450          <tr>
451            <th>Location Name</th>
452          </tr>
453          <tr>
454             <td><input id="variable13" name="Nb_var13" type="text" size="80" maxlength="35" value="<Nb_var13>">
455             </td>
456          </tr>
457          <tr>
458             <td><label id="Location"></label></td>
459          </tr>
460       </table>   

Here is the other table:

461 <table>
462          <tr>
463            <th>Welcome Message</th>
464          </tr>
465          <tr>
466            <td><input id="variable58" name="Nb_var58" type="text" size="80" maxlength="23" value="<Nb_var58>">
467            </td>
468          </tr>
469          <tr>
470            <td><label id="Welcome"></label></td>
471          </tr>
472       </table>

I ran this through the W3C Validator, it stop complaining...

Thank you everyone!

Upvotes: 1

BoltClock
BoltClock

Reputation: 723688

You have a <tr> start tag right after your <input> tag in lines 456 and 469. Since that causes the previous <tr> and <td> tags to implicitly close, the parser is only expecting at most one set of </td> and </tr> end tags for your second table row, and not another set even though that set is obviously meant for your first table row.

If anything, it appears that whatever is generating your table HTML is not outputting that particular row in the right place.

Upvotes: 2

opalenzuela
opalenzuela

Reputation: 3171

You have cells inside rows, but also rows inside cells. This is not a supported structure.

Upvotes: 1

Related Questions