Log in

View Full Version : Help to validate document as XHTML 1.0 (newbie question)



iv4o
12-27-2009, 04:04 PM
Hi, i try to validate my site and im almost dune. I have left 5 errors !! They reallty drive me crazzy and make me really unhappy......

What the validator return is :

1. Error document type does not allow element X here; missing one of Y start-tag



The mentioned element is not allowed to appear in the context in which you've placed it; the other mentioned elements are the only ones that are both allowed there and can contain the element mentioned. This might mean that you need a containing element, or possibly that you've forgotten to close a previous element.

One possible cause for this message is that you have attempted to put a block-level element (such as "<p>" or "<table>") inside an inline element (such as "<a>", "<span>", or "<font>").
* Line 124, column 67: document type does not allow element "table" here; missing one of "th", "td" start-tag

…"100%" border="0" cellspacing="0" cellpadding="0">

* Line 127, column 79: document type does not allow element "table" here; missing one of "th", "td" start-tag

…nter" cellpadding="0" cellspacing="0">

* Line 136, column 30: document type does not allow element "table" here; missing one of "th", "td" start-tag

<table width="100%">

* Line 139, column 62: document type does not allow element "table" here; missing one of "th", "td" start-tag

… <table width="150" border="0" bgcolor="white">

* Line 1321, column 70: document type does not allow element "table" here; missing one of "th", "td" start-tag

…0%" border="0" cellspacing="0" cellpadding="0">


Here is the part of my code where i receice the errors :


<table width="100%" border="0" cellpadding="20" cellspacing="20" >
<tr>
<td valign="top" style="border: 1px solid #CCD7E0; background-color: #FFFFFF;" class="shadow2" />
<!-- {LOGIN_FORM} -->

<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td valign="top" align="left" id="content_frame" />
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td>
<a href="index.php"><img src="themes/water_drop/images/logo.png" border="0" alt="" /></a>
<br /><br />
{ADMIN_MENU}
</td>
</tr>
</table>
<table width="100%">
<tr>
<td width="150" valign="top" align="center" bgcolor="white" />
<table width="150" border="0" bgcolor="white">
<tr>
<td width="150">{SYS_MENU} <hr /> {SUB_MENU}
</td>
</tr>
</table>
<td>{GALLERY}
</td>
</tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td align="center" valign="top">
{LANGUAGE_SELECT_FLAGS}
{THEME_SELECT_LIST}{LANGUAGE_SELECT_LIST}
</td>
</tr>
</table>
</tr>
</table>
</tr>
</table>


I did my best to solve most of the errors from my site and hereare the lasts.

link to my site :

www.abroadbg.com

V3C Markup Result (http://validator.w3.org/check?uri=http%3A%2F%2Fwww.abroadbg.com%2Findex.php&charset=%28detect+automatically%29&doctype=Inline&ss=1&group=1&No200=1&user-agent=W3C_Validator%2F1.654)

jscheuer1
12-27-2009, 05:06 PM
Here:


<a href="javascript:ts('body',1)"><strong>&nbsp;&nbsp;+ Larger Font </strong></a>
<a href="javascript:ts('body',-1)"><strong>- Smaller Font</strong></a>

<table width="100%" border="0" cellpadding="20" cellspacing="20" >
<tr>

<td valign="top" style="border: 1px solid #CCD7E0; background-color: #FFFFFF;" class="shadow2" />
<!-- {LOGIN_FORM} -->

<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td valign="top" align="left" id="content_frame" />
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>

and here:


</table>
<table width="100%">
<tr>
<td width="150" valign="top" align="center" bgcolor="white" />
<table width="150" border="0" bgcolor="white">
<tr>
<td width="150">
<div class="wireframemenu">

<h1 class="background">Menu</h1>

The td tag can never be self closing. Replace all 3:


/>

with:


>

Here add the highlighted missing </td> tag:


<p align="left"><a href="http://www.htmldog.com/"><img src="http://www.htmldog.com/badge3.gif" width="88" height="31" border="0" alt="HTML and CSS tutorials, references, and articles" /></a></p>
</div>
</td>
</tr>
</table>
</td>
<td>
<!-- Start standard table -->
<table align="center" width="100%" cellspacing="1" cellpadding="0" class="maintable">
<tr>
<td class="table

Same thing here:


<a href="index.php?lang=xxx" rel="nofollow"><img src="images/flags/reset.gif" border="0" width="16" height="11" alt="" title="Default language" /></a>
</div>

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

</table>

iv4o
12-27-2009, 05:32 PM
Here:


<a href="javascript:ts('body',1)"><strong>&nbsp;&nbsp;+ Larger Font </strong></a>
<a href="javascript:ts('body',-1)"><strong>- Smaller Font</strong></a>

<table width="100%" border="0" cellpadding="20" cellspacing="20" >
<tr>

<td valign="top" style="border: 1px solid #CCD7E0; background-color: #FFFFFF;" class="shadow2" />
<!-- {LOGIN_FORM} -->

<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td valign="top" align="left" id="content_frame" />
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>

and here:


</table>
<table width="100%">
<tr>
<td width="150" valign="top" align="center" bgcolor="white" />
<table width="150" border="0" bgcolor="white">
<tr>
<td width="150">
<div class="wireframemenu">

<h1 class="background">Menu</h1>

The td tag can never be self closing. Replace all 3:


/>

with:


>

Here add the highlighted missing </td> tag:


<p align="left"><a href="http://www.htmldog.com/"><img src="http://www.htmldog.com/badge3.gif" width="88" height="31" border="0" alt="HTML and CSS tutorials, references, and articles" /></a></p>
</div>
</td>
</tr>
</table>
</td>
<td>
<!-- Start standard table -->
<table align="center" width="100%" cellspacing="1" cellpadding="0" class="maintable">
<tr>
<td class="table

Same thing here:


<a href="index.php?lang=xxx" rel="nofollow"><img src="images/flags/reset.gif" border="0" width="16" height="11" alt="" title="Default language" /></a>
</div>

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

</table>


Thank you very very much i really appreciate yr help, second time u helping me. I can pass the validation without any errors now !!