Weird. Check this out.

I have attached an file. Change this files extension to *.html and validate at <!-- w --><a class="postlink" href="http://www.w3.org">www.w3.org</a><!-- w --><br />
<br />
It validates correctly! What is wrong with this?<br />
<br />
<br />
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><br />
<meta http-equiv="Content-type" content="text/html; <br />
charset=iso-8859-1"><br />
<title/Unbelievable/<br />
<TABLE width="100%"><br />
<tr><br />
<td width="20%"><h1/This/<br />
Is<br><br />
All<br><br />
Legal!<br />
</td><br />
<td width="80%">Does this look like valid HTML to you?<br />
<p>Well, it is.<br />
<a href=http://www.webdeveloper.com/forum/archive/index.php/"http://validator.w3.org/check?<br />
uri=http://my.ip.too.bad/w3c.html"><br />
Click to validate at the W3C.</a><br />
</td><br />
</tr><br />
</TABLE><!--content-->I'm guessing it is interpreting<br />
<br />
<title/unbelivable/<br />
as<br />
<title /><br />
<br />
But you should probably ask the W3C guys if it's really supposed to be like that (ie passing validation).<!--content-->There aren't even any <html> tags or <head> or <body> tags. I'll contact W3C.<!--content-->Originally posted by Zach Elfers <br />
There aren't even any <html> tags or <head> or <body> tags. <br />
<br />
That is not a problem. All those 3 tags are OPTIONAL in HTML and can thus be left out.<br />
Only when you move to XHTML do they become required.<br />
<br />
The only things required in a HTML document is the doctype and a title.<!--content-->Oh. I thought that the <html> tags were required.<!--content-->Originally posted by Zach Elfers <br />
Oh. I thought that the <html> tags were required. <br />
<br />
Yes, it's a very common missconception.<br />
<br />
The HTML/HEAD/BODY ENTITY is required, but the TAGS (which mark where the entity in question start and end) are optional.<br />
<br />
This leaves it up to the webbrowser errorcorrection to figure out where they should be (and thus leaving them out requires more CPU from the visitors comp to render the page).<br />
Most designers thus add these tags, both for their own sanity as well as the reciving computers.<!--content-->
 
Back
Top