- From: Jukka K. Korpela <jkorpela@cs.tut.fi>
- Date: Wed, 3 Nov 2004 11:45:05 +0200 (EET)
- To: hapaaso@pp.inet.fi
- Cc: www-validator@w3.org
On Wed, 3 Nov 2004 hapaaso@pp.inet.fi wrote: > I cheched my index.html trough your validator and got the errors listed > at the end of this e-mail. Like I explaned in this message, I wrote an > e-mail to hwg-techniques@hwg.org, but I haven't got any answer. I don't think the HTML Writers Guild offers free consultation, but in any case, that's not a business of the W3C or this list. > So could > you help me by explaning what these errors mean and how I can correct > them. You are supposed to do your homework and study the messages yourself, maybe making use of the validator's suggestions. Only after doing your best should you ask for help in public. One reason to this is that unless you've done your homework, the odds are that you won't really understand the help you might get. For example, > > Line 78, column 36: there is no attribute "ALIGN" > > > > <table border="0" width="97%" align="center"> > > > > 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). > > > > This error may also result if the element itself is not supported in the document type you are using, as an undefined element will have no supported attributes; in this case, see the element-undefined error message for further information. > > > > How to fix: check the spelling and case of the element and attribute, (Remember XHTML is all lower-case) and/or check that they are both allowed in the chosen document type, and/or use CSS instead of this attribute. The explanation is, well, rather self-explanatory. Read it again if you didn't understand it. Then check your book or reference on HTML. You will find that HTML 4.01 Strict, which you purport to use (by the DOCTYPE declaration), does not allow an align attribute for <table>. So you need to change the DOCTYPE to refer to HTML 4.01 Transitional, or remove the attribute. > > My own comment > > Does this mean that officially I can't center a table? That question is not about validation. Check your books and references or suitable Web resources for such issues. (The short answer is that you can center a table when using HTML 4.01 Strict but you need to use CSS for the presentational suggestion.) Most of the other messages are related to using Transitional attributes despite claiming to use Strict. > > Line 84, column 201: required attribute "ALT" not specified That's different. You simply need to add an ALT attribute. The tricky part is to write a _useful_ value for it; as far as validation goes, any value is accepted. > > Line 107, column 61: "IMG" is not a member of a group specified for any attribute > > > > ...g name="kopio_valikko72_100sint" img src="kuvat/kopio_valikko72_100sint.gif" That's an interesting error: you have an <img> element containing a spurious occurrence of the element name in the midst of attribute specifications. It should be trivial to delete that occurrence, but the interesting question is what produced it in the first place. Some odd authoring tool? -- Jukka "Yucca" Korpela, http://www.cs.tut.fi/~jkorpela/
Received on Wednesday, 3 November 2004 09:45:36 UTC