The Web Design Group

... Making the Web accessible to all.

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> Validation errors: doctype not allowing elelment "a"
seekinganswers
post Jul 9 2008, 02:59 AM
Post #1





Group: Members
Posts: 6
Joined: 9-July 08
Member No.: 6,110



Hello Group,

My first post ... running a W3C validation on my site:

www.ittf.com/museum

and I am getting a series of errors, mainly that Doctype does not allow element "a" here.

But the links all function correctly, so I'm a bit confused.

I've used <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

As the code will confirm, I am only a basic table guy, nothing fancy, but everything seems to work.

The Validator is objecting to a series of <a href ...> ... </a>, within a <td>, all of which work properly, so the syntax looks ok.

By the way, I am using Notepad to edit my .html code - how do I get line numbers to help coincide with the validation output.

Thanks for looking in.

seekinganswers

User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
seekinganswers
post Jul 9 2008, 03:24 AM
Post #2





Group: Members
Posts: 6
Joined: 9-July 08
Member No.: 6,110



Hello Group,

I've found my mistake so the element "a" problem is solved.

Now just 18 more validation errors to find, mostly dealing with font entries, and a few others.

www.ittf.com/museum

Thanks for looking in.

seekinganswers
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Darin McGrew
post Jul 9 2008, 04:11 AM
Post #3


WDG Member
********

Group: Root Admin
Posts: 8,365
Joined: 4-August 06
From: Mountain View, CA
Member No.: 3



CODE
Error: element PRE not allowed here; possible cause is an inline element containing a block-level element
As the error message says, you can't put block-level elements inside inline (text-level) elements.

CODE
Error: end tag for FONT omitted; possible causes include a missing end tag, improper nesting of elements, or use of an element where it is not allowed
Error: end tag for element FONT which is not open; try removing the end tag or check for improper nesting of elements
As the error message says, you've nested elements incorrectly.

<outer><inner>...</inner></outer> is correct.
<first><second>...</first></second> is incorrect.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
seekinganswers
post Jul 9 2008, 07:32 AM
Post #4





Group: Members
Posts: 6
Joined: 9-July 08
Member No.: 6,110



Thanks for looking in Darin and for your comments about the validation errors I am experiencing.

OK, I have fixed everything except for the two <pre> ... </pre> errors.

I note the validation error description, and your comment, but do not know how to fix this.

Need to insert those two lines of formatted text within the table <td> elements, at exactly those
locations as now shown on the site: www.ittf.com/museum

Validation tags them as errors, yet they work properly, though maybe not on all browsers.

So if you have time for one last look Darin, that would be great. What is the fix?

As you have no doubt already realized, I just know enough to scrape by.
So far our target audience has given consistently positive feedback about the site.

seekinganswers
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Darin McGrew
post Jul 9 2008, 08:26 AM
Post #5


WDG Member
********

Group: Root Admin
Posts: 8,365
Joined: 4-August 06
From: Mountain View, CA
Member No.: 3



You're trying to put a pre element inside a b element and a font element. You can't do that. Block-level elements like pre can contain inline elements like b and font, but not the other way around.

And actually, pre is a special case. It doesn't allow the font element inside it. But the font element is best avoided anyway. Use CSS instead.

See also PRE - Preformatted Text in our HTML 4 reference.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post

Reply to this topicStart new topic
2 User(s) are reading this topic (2 Guests and 0 Anonymous Users)
0 Members:

 



- Lo-Fi Version Time is now: 25th April 2024 - 01:54 AM