By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
437,648 Members | 1,203 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 437,648 IT Pros & Developers. It's quick & easy.

validation error help

P: 3
I have started again after my previous effort had so many errors.

the url is http://www.freebetsonline.info/freebets2.html.

using the w3c validation page I have 5 errors, four are the same error.
the errors are:

Error Line 68 column 31: there is no attribute "background".
<td height="94" background="../images/bannertitle1.gif"><iframe align="right

You have used the attribute named above in your document, but the document type you are using does not support that attribute for this element. This error is often caused by incorrect use of the "Strict" document type with a document that uses frames (e.g. you must use the "Transitional" document type to get the "target" attribute), or by using vendor proprietary extensions such as "marginheight" (this is usually fixed by using CSS to achieve the desired effect instead).

and 4 of this error:
Error Line 87 column 42: document type does not allow element "div" here; missing one of "object", "applet", "map", "iframe", "button", "ins", "del" start-tag.
<font size="1"><div style="float:left">BlueSq</div></font>

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.

im trying to have writing left aligned and also right aligned in one table cell, how can i fix these errors? the alignment shows up correct on the page.
thanks
Feb 15 '07 #1
Share this Question
Share on Google+
3 Replies


drhowarddrfine
Expert 5K+
P: 7,435
The problem is you are applying <font> and <strong> and other text elements to the <div> element which doesn't make sense. A <div> is used to contain other elements so you should make it contain those tags plus the text you have there.

But I don't see the reason for the div at all. You have the text contained in a data cell so why the div?

Also, why do you use the font tags, background stuff and so on instead of putting it in your css? xhtml requires it but it will work because it is being served as html.

Your doctype is still incomplete. It should be:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd
Feb 15 '07 #2

P: 3
hi,

thanks for the reply. I am using div as i want part of the text in one cell to be aligned to the left and part to the right.

ie
bet 25

i dont understand what you mean about the font tags and background tags, do you mean I should create a css element for these?

sorry about this, im just learning :o)

thanks
Feb 15 '07 #3

Expert 100+
P: 1,892
hi,

thanks for the reply. I am using div as i want part of the text in one cell to be aligned to the left and part to the right.

ie
bet 25

i dont understand what you mean about the font tags and background tags, do you mean I should create a css element for these?

sorry about this, im just learning :o)

thanks
Certain tags have been deprecated such as font etc.. the new standard is to use CSS. Here is a great place to get started learning.

Aric
Feb 22 '07 #4

Post your reply

Sign in to post your reply or Sign up for a free account.