W3C home > Mailing lists > Public > www-validator@w3.org > June 2010

Re: question

From: Jukka K. Korpela <jkorpela@cs.tut.fi>
Date: Fri, 11 Jun 2010 16:13:32 +0300
Message-ID: <BD5B691A05C14618935FD85EC326911B@JukanPC>
To: "francesco arena" <framcesco@gmail.com>, <www-validator@w3.org>
francesco arena wrote:

> We are looking for the solution of errors.

You should have posted the URL of your document and a plain text explanation 
of your problem with it, not copy of the code or a Word attachment.

Luckily the Word attachment, once I had dared to open it despite security 
warnings, appears to contain the URL:
http://www.scuolacellini.com/

The document contain different kinds of syntax errors:

At line 19, there is a <tr> element with the height="..." attribute, which 
is not allowed in the document type you declare, or in any document type 
defined in HTML specifications for that matter. To set the height of a table 
row, set height for each cell, either in HTML or (preferably) in CSS.

At line 37, there is a <div> element when a <span> element has been opened. 
This is not permitted: a block element like <div> may not occur inside an 
inline element line <span>. Since the apparent purpose is to bold the 
contents of the <div> element, just remove the <span> markup and make the 
style sheet rule apply directly to the <div> element, e.g.
<div style="font-weight: bold;" id="google_translate_element"></div>

At lines 38, 46, and 279, there is a <script> element without the type="..." 
attribute. Just add the attribute type="text/javascript".

There are several errors, starting at line 169, consisting of duplicate use 
of an identifier ("title", incorrectly quoted by the validator as "TITLE") 
as the value of an id="..." attribute. By definition, an id="..." attribute 
assigns a unique identifier to an element, so you cannot use the same 
identifier for several elements. It seems that you are actually trying to 
use the attribute for classification purposes so that you can style several 
<div> elements the same way. The proper way to do such classification is the 
class="..." attribute. Note that doing so, you need to change the selector 
in CSS, too: in CSS, one uses #title to refer to the element with id="title" 
but .title (dot followed by the class name) to refer to any element with 
class="title" (or, more generally, any element with a class attribute 
containing the name title as a component. On the other hand, such usage 
looks very much like an attempt to use headings without using proper heading 
markup. The markup looks rather confusing, but really fixing it goes beyond 
the scope of validation - I just wanted to point out that maybe the 
structure as a whole should be reconsidered, instead of just fixing the 
syntax errors.

Finally, at line 283, there are two <img> elements that lack the required 
alt="..." attribute. As far as validation is concerned, you could put there 
alt="I have no idea of what alt attribute is about" (so we should not really 
believe in the propaganda that claims that validation makes pages 
interoperable etc.), or, as there is for another <img>, on this page 
containing almost exclusively Japanese text, alt="contatore traffico". But 
to be sensible, you should ask yourself: if a blind man listens to this page 
using a speech synthesizer, what should he hear when the synthesizer 
encounters a particular <img> element? Normally the answer to this is what 
you should put into the alt="..." attribute. In this case, that would 
apparently be alt="" (i.e., alt attribute with the empty string as its 
value).

-- 
Yucca, http://www.cs.tut.fi/~jkorpela/ 
Received on Friday, 11 June 2010 13:14:16 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 25 April 2012 12:14:41 GMT