Loading ...
Sorry, an error occurred while loading the content.
 

code problem

Expand Messages
  • mgtbmc
    Now that I can finally post here, I d like the html guru s to offer some help. After 3 yrs. on site, I made a minor change on this page, then checked it out
    Message 1 of 2 , Oct 28 4:26 AM
      Now that I can finally post here, I'd like the html guru's to offer
      some help.

      After 3 yrs. on site, I made a minor change on this page, then
      checked it out with ARV and couldn't believe the error it found. I
      don't understand the error, and for the life of me, everything I've
      tried to do to correct it ends in disaster. I thought I had html
      pretty well under control, but apparently not in this case.

      The error claimed is this : <p><a href= .....><Img
      SRC.......></a></p><p>etc. I don't get it!

      "p" is a block-line element and should be able to contain "IMG SRC"
      which is an inline element . The "A HREF" anchor is a necessary part
      of that SRC in the several instances where they appear in that page
      section.

      Code can be seen here since pasting it seems to botch up the
      emails............

      http://www.mmwindowtoart.com/page2a.html


      What needs to be corrected here? Thanks so much. MM
    • Rudolf Horbas
      tidy says (among other things): line 77 column 1025 - Warning: missing before line 81 column 1 - Warning: trimming empty And the w3c also has a
      Message 2 of 2 , Oct 28 5:42 AM
        tidy says (among other things):

        line 77 column 1025 - Warning: missing </a> before </p>
        line 81 column 1 - Warning: trimming empty <p>

        And the w3c also has a few things to say:
        ################################################################
        http://validator.w3.org/check?uri=http://www.mmwindowtoart.com/page2a.html
        ################################################################
        This page is not Valid HTML 4.0 Transitional!
        Below are the results of attempting to parse this document with an
        SGML parser.

        1. Line 73, column 952: document type does not allow element "A"
        here (explain...).
        ...LT="" hspace="6"><a href="links.html"><IMG SRC="links.jpg"
        WIDTH="77" HEIGHT=
        ^

        2. Line 73, column 1027: end tag for "A" omitted, but its
        declaration does not permit this (explain...).
        ...T="32" BORDER="0" ALT="links"></a></p>
        ^

        3. Line 73, column 838: start tag was here (explain...).
        ...DER="0" ALT="" hspace="6"></a></p><p><a href="page1a.html"><IMG
        SRC="home.jpg

        ################################################################

        Looks like You stripped Your posted example code 'till it was correct ...

        Wait am moment, why let the machines do all the thinking ... there it is
        (reformatted, with attributes stripped):

        <a href="page1a.html"> <!-- a1 open, not closed -->
        <img SRC="home.jpg">
        <a href="links.html"> <!-- a2 open -->
        <img SRC="links.jpg">
        </a> <!-- a closed -->


        HTH,
        rudi
      Your message has been successfully submitted and would be delivered to recipients shortly.