Re: Tidy

On 24 Jan 2001, at 15:32, David Gauld wrote:

> Now I am no expert in coding web pages or the like but as far as I can
> tell what the error log is saying is wrong isn't. 

Running the current version of Tidy (4-Aug-00) against "intro.htm" yields:

  line 21 column 334 - Warning: <img> lacks "alt" attribute

...and indeed there is no "alt" attribute on the "img" element at that 
location.  The "alt" attribute is required on "img" elements in HTML 4.01 
Transitional, so this warning from Tidy is correct.

Note that if I validate your "intro.htm" file at:

  http://validator.w3.org/file-upload.html

...I get:

  Line 9, column 29: 
    <META http-equiv="VW96.OBJECT TYPE" content="Genealogy">
                                 ^
  Error: value of attribute "HTTP-EQUIV" must be a single token

  Line 21, column 422: 
    ... b/viewbook.gif" border="0" width="100" height="35"></A></P>
                                                          ^
  Error: required attribute "ALT" not specified

  Sorry, this document does not validate as HTML 4.01 Transitional. 


Validation is your friend!  ;-)


Running Tidy against "intro2.htm" gives:

  line 5 column 1 - Warning: <script> lacks "type" attribute
  line 37 column 6 - Warning: <img> lacks "alt" attribute
  line 78 column 856 - Warning: unescaped & which should be written as
                       &amp;

I do not get the "line 70 column 4 - Warning: trimming empty <p>" message.

You don't have a DOCTYPE on this file, but assuming HTML 4.01 Transitional 
again:

 * The "alt" error is as above and is correct.

 * The "type" error is correct; 4.01 Transitional requires "type" on the
   "script" element.

 * The recommendation to use "&amp;" for "&" comes straight from the HTML
   4.01 Specification:

     Authors should also use "&amp;" in attribute values since character
     references are allowed within CDATA [p.50] attribute values. 

   See:
     http://www.w3.org/TR/html401/charset.html#h-5.3.2


> But that is why I'm sending you these files in the hopes that maybe you
> can clear this up for me. 

Hope this helps.

                                      -- Dave

Received on Thursday, 25 January 2001 18:34:04 UTC