Stromgren Posted February 21, 2012 Share Posted February 21, 2012 Hello! I just ran my site through the validator and i got this error message: Line 72, Column 24:document type does not allow element "td" here The element named above was found in a context where it is not allowed. This could mean that you have incorrectly nested elements -- such as a "style" element in the "body" section instead of inside "head" -- or two elements that overlap (which is not allowed).One common cause for this error is the use of XHTML syntax in HTML documents. Due to HTML's rules of implicitly closed elements, this error can create cascading effects. For instance, using XHTML's "self-closing" tags for "meta" and "link" in the "head" section of a HTML document may cause the parser to infer the end of the "head" section and the beginning of the "body" section (where "link" and "meta" are not allowed; hence the reported error). This is the code: <table> <tr> <td> <img class="toprated_icon" src="images/orb_mechanic_small" alt="orb_mechanic_small" /> <td> <h2 class="toprated_cyan_12px_underline">Helical Gear</h2> <h3 class="toprated_mgrey_10px">Downloads: 2189</h3> </td> </td> </tr> </table> Can anyone tell me where i'm going wrong? I can't seem to figure this out. Link to comment Share on other sites More sharing options...
dsonesuk Posted February 21, 2012 Share Posted February 21, 2012 You can't have a td element within another td element Link to comment Share on other sites More sharing options...
Stromgren Posted February 21, 2012 Author Share Posted February 21, 2012 You can't have a td element within another td element Okay! So how should i go around it if i want to achieve a result like this? Thanks Link to comment Share on other sites More sharing options...
dsonesuk Posted February 21, 2012 Share Posted February 21, 2012 with rowspan <table width="100%" border="1" cellspacing="0" cellpadding="0"> <tr> <td rowspan="2"> </td> <td> </td> </tr> <tr> <td> </td> </tr></table> Link to comment Share on other sites More sharing options...
Stromgren Posted February 21, 2012 Author Share Posted February 21, 2012 Thanks a lot dsonesuk! Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.