Forum Moderators: open
<table border="1">
<colgroup span="3">
<col width="15"></col>
<col width="50"></col>
<col width="30"></col>
<col width="20"></col>
</colgroup>
<tr>
<td>15</td>
<td>50</td>
<td>30</td>
<td>20</td>
</tr>
</table>
Since the error mentions a column with its width set to 80, and none of the columns in your pasted code have that width, I would suggest the problem is in a different table.
Also be aware that you have <colgroup span="3"> when there are 4 columns.
Its written for nerds by nerds, so some of the language can be a little confusing at times, but it should tell you anything you need to know.
However, to avoid problems when writing XHTML: for elements like <br> and <input>, don't include </br? or </input> afterwards (even though this is correct, XML strictly speaking). Do this instead:
<br /> and <input />
This is a "shorthand closing tag" and is the prefered way of doing it. However, in HTML 4 tags like BR, HR, INPUT shouldn't have any form of closing tags at all.
Doesn't everything in HTML have a matching close tag like that?
Not always.
Basically if an element can contain something (like text) then it will have an opening and closing tag.
e.g. elements like <div>, <td>, <span>, <p>, <form> etc require closing tags.
but if the element can't contain anything then it wont.
e.g. elements like <img>, <col>, <br>, <input> don't require closing tags
Hope that helps.
Kathy, you are to be commended for making such a valiant effort to be standards compliant, given that you are probably fairly new to web development. While I respect w3schools for some things, you are probably doing things the hard way if you are using their online tutorials to get started. Perhaps have a look at [webmasterworld.com...] instead.
Shawn
I inserted the code to embed a Google search on my pages. I like it. Validator loathes it. I now have 63 errors, 61 of which are in the google lines. The other two I think I can figure out, but can anyone see what the problem is with this validating to xhtml 1.1 strict? w/ css
<div id="goog">
<form method=get action=http://www.google.com/custom target=_blank>
<table bgcolor="#FFFFCC" cellspacing="0" border="0">
<tr valign=top>
<td>
<a href="http://www.google.com/search">
<img src="http://www.google.com/logos/Logo_40wht.gif" border="0" alt="Google" align="middle"></a>
</td>
<tr valign=top>
<td>
<input type=text name=q size=35 maxlength=255 value="">
<input type=submit name=sa value="Google Search">
<input type=hidden name=cof value="LW:396;L:http://myurl.com/mylogo.jpg;LH:160;BGC:#ffffcc;AH:center;S:http://myurl.com;AWFID:4d4626b792a88e3e;">
<font face=arial,sans-serif size=-1>
<input type=hidden name=domains value="myurl.info;myurl.com"><br />
<input type=radio name=sitesearch value="myurl.info"> Search myurl.info
<input type=radio name=sitesearch value="myurl.com"> Search myurl.com
</td></tr>
<tr><td>
<input type=radio name=sitesearch value="" checked> Search WWW
</font></td></tr></table>
</form>
</div>
I think when I copied this code, it had all caps, which I changed to lower case, and I half remember changing the order of two table cells, but other than that, this is the code google created based on my selections for display. any ideas?
Dian :)
If I'm not mistaken, I believe Google strips the quotes from its attributes to save on bandwidth.
Example of quoted attributes. This code here...
<input type=text name=q size=35 maxlength=255 value="">
<input type=submit name=sa value="Google Search">
...should look like this...
<input type="text" name="q" size="35" maxlength="255" value="">
<input type="submit" name="sa" value="Google Search">
I'll learn to trust my hunches more, but in the mean time, thanks for the back-up! I'll go make it right.
~Dian
This Page Is Valid -//W3C//DTD XHTML1.1//EN!
Thanks to this forum..because I sure couldn't understand the comments at the validator!
(using Strict, AND no tables for layout, Thanks for CSS assistance from the people at the CSS forum here too!)
~Dian
Just buggin'