Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

why won't this validate? why?

Status
Not open for further replies.

soniclnd

Technical User
Jan 6, 2005
51
US
hello, I'm working on a template, but it doesn't validate, I have no idea why... here's the source

Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "[URL unfurl="true"]http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">[/URL]
<html xmlns="[URL unfurl="true"]http://www.w3.org/1999/xhtml"[/URL] lang="en" xml:lang="en">
<head>

<title>title</title>

<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />


<link rel="stylesheet" href="styles.css" type="text/css" />

<link rel="shortcut icon" href="favicon.ico" />

</head>
<body>



<div class="container text-center">

<!-- //////////// start main holder //////////// -->

<div id="mainholder">

<!-- //////////// start top //////////// -->
<div id="maintop">

<table class="fcontentt" cellpadding="0" cellspacing="0">
<tr>
<td id="tl" valign="top">

<!-- ////////////////////// start header left ////////////////////// -->

<div id="headertl">

<div class="sitetitle"><a href="#">Site</a></div>
<div class="headertxt">
description</div>


</div>

</div>

<!-- ////////////////////// end header left ////////////////////// -->

</td>

<td id="tr" valign="top">

<!-- ////////////////////// start mini header right ////////////////////// -->

<div id="mheadertr">

<span style="font-size: 10px;">date</span>
</div>

<!-- ////////////////////// end mini header right ////////////////////// -->

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

</div>
<!-- /////// end top /////// -->

<!-- /////// start center /////// -->

<div id="maincenter">

<table class="fcontentt" cellpadding="0" cellspacing="0">
<tr>
<td id="cl" valign="top">

<!-- ////////////////////// start main nav ////////////////////// -->

<div id="mainnav">

navigation


</div>

<!-- ////////////////////// end main nav ////////////////////// -->

</td>
<td id="cc" valign="top">

<!-- ////////////////////// start main content ////////////////////// -->

<div id="maincontent">


content


<br /><br />
</div>

<!-- ////////////////////// end main content ////////////////////// -->

</td>
<td id="cr" valign="top">

<!-- ////////////////////// start right ////////////////////// -->

<div id="right">

right

</div>

<!-- ////////////////////// end right ////////////////////// -->

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

</div>

<!-- /////// end center /////// -->

<!-- /////// start bottom /////// -->

<div id="mainbottom">

<table class="fcontentt" cellpadding="0" cellspacing="0">
<tr>
<td id="bl" valign="top">

<!-- /////// start bottom left /////// -->

<div id="bottoml">

<div class="text-center">
stuff
</div>

</div>

<!-- /////// end bottom left /////// -->

</td>

<td id="bc" valign="top">

<!-- ////////////////////// start bottom center ////////////////////// -->

<div id="bottomc">

<div style="font-size: 10px; text-align: center;">
©
</div>

</div>

<!-- ////////////////////// end bottom center ////////////////////// -->

</td>
<td id="br" valign="top">

<!-- /////// start bottom right /////// -->

<div id="bottomr">



</div>

<!-- /////// end bottom right /////// -->

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

</div>

<!-- /////// end bottom /////// -->

</div>

<!-- /////// end main holder /////// -->

</div>



</body>
</html>
 
Yo don't say what the error is when you try to validate the page but this

Code:
<div style="font-size: 10px; text-align: center;">
©
</div>

Should be
Code:
<div style="font-size: 10px; text-align: center;">
[COLOR=red]&copy;[/color]
</div>

Perhaps that's where it's failing?

Foamcow Heavy Industries - Web design and ranting
Target Marketing Communications - Advertising, Direct Marketing and Public Relations
I wonder what possesses people to make those animated gifs. Do you just get up in the morning and think, "You know what web design r
 
I went to the trouble of running you page through the W3C validator to see what the errors were.
It's rather helpful if you read through this.

below are the results of checking this document for XML well-formedness and validity.

1. Error Line 43 column 5: end tag for "td" omitted, but OMITTAG NO was specified.

</div>

You may have neglected to close an element, or perhaps you meant to "self-close" an element, that is, ending it with "/>" instead of ">".

?
2. Info Line 30 column 0: start tag was here.

<td id="tl" valign="top">

3. Error Line 43 column 5: end tag for "tr" omitted, but OMITTAG NO was specified.

</div>

?
4. Info Line 29 column 0: start tag was here.

<tr>

5. Error Line 43 column 5: end tag for "table" omitted, but OMITTAG NO was specified.

</div>

?
6. Info Line 28 column 0: start tag was here.

<table class="fcontentt" cellpadding="0" cellspacing="0">

7. Error Line 47 column 4: end tag for element "td" which is not open.

</td>

The Validator found an end tag for the above element, but that element is not currently open. This is often caused by a leftover end tag from an element that was removed during editing, or by an implicitly closed element (if you have an error related to an element being used where it is not allowed, this is almost certainly the case). In the latter case this error will disappear as soon as you fix the original problem.

If this error occured in a script section of your document, you should probably read this FAQ entry.

?
8. Error Line 49 column 24: document type does not allow element "td" here.

<td id="tr" valign="top">

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).

?
9. Error Line 61 column 4: end tag for element "tr" which is not open.

</tr>

?
10. Error Line 62 column 7: end tag for element "table" which is not open.

</table>

?
11. Error Line 184 column 5: end tag for element "div" which is not open.

</div>


Read through that, and change what it says is wrong, starting with the first item.
After each change, validate it again. You may find that fixing changing 1 thing will fix several problems.

At first glance it looks like you have an extra </div> in there around line 43. Take that out and revalidate it.

Foamcow Heavy Industries - Web design and ranting
Target Marketing Communications - Advertising, Direct Marketing and Public Relations
I wonder what possesses people to make those animated gifs. Do you just get up in the morning and think, "You know what web design r
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top