SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    SitePoint Evangelist cgacfox's Avatar
    Join Date
    Feb 2005
    Location
    Colorful Colorado
    Posts
    412
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    2 Errors I can't figure out when checking my HTML5 site through Firefox

    Ok, I have a new client that I am designing a website for. I haven't done a site in quite a while. I thought since I have Adobe CS5.5 that I would try out the HTML5. I know that nothing is written in stone yet for it but I am getting 2 errors that work perfectly in XHTML but HTML5 doesn't like it. They are:
    Line 104, Column 62: Attribute img not allowed on element img at this point.

    <p> <img class="rtF" img src="images/proudsponsers.png"></p>

    Attributes for element img:
    Global attributes
    alt
    src
    usemap
    ismap
    width
    height

    Error Line 104, Column 62: An img element must have an alt attribute, except under certain conditions. For details, consult guidance on providing text alternatives for images.

    <p> <img class="rtF" img src="images/proudsponsers.png"></p>

    The site is under http://foxdenwebsolutions.com/tree town wonderland/index.html. I am wondering if I need to move the img class to the CSS page now. If I can clear up these 2 errors, I will be fine according to the w3.org site. Please help me figure out what I am doing incorrectly.
    Thanks.

  2. #2
    SQL Consultant gold trophysilver trophybronze trophy
    r937's Avatar
    Join Date
    Jul 2002
    Location
    Toronto, Canada
    Posts
    39,017
    Mentioned
    53 Post(s)
    Tagged
    2 Thread(s)
    Quote Originally Posted by cgacfox View Post
    Please help me figure out what I am doing incorrectly.
    okay, let's start with the first error message...

    Line 104, Column 62: Attribute img not allowed on element img at this point.

    <p> <img class="rtF" img src="images/proudsponsers.png"></p>
    does the error message now make sense? i've highlighted the part that it finds objectionable
    r937.com | rudy.ca | Buy my SitePoint book: Simply SQL
    "giving out my real stuffs"

  3. #3
    SitePoint Evangelist cgacfox's Avatar
    Join Date
    Feb 2005
    Location
    Colorful Colorado
    Posts
    412
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Aha, so I only need to have img once so img class"" src="" etc for HTML5. That's cool. Too bad that DW is not that smart to save me time in figuring this out. I would like someone to come up with a book on all the changes from 4.1 to 5 as in the syntax changes. That would be very helpful. Thank you so much for answering my question.

  4. #4
    SQL Consultant gold trophysilver trophybronze trophy
    r937's Avatar
    Join Date
    Jul 2002
    Location
    Toronto, Canada
    Posts
    39,017
    Mentioned
    53 Post(s)
    Tagged
    2 Thread(s)
    Quote Originally Posted by cgacfox View Post
    Aha, so I only need to have img once so img class"" src="" etc for HTML5. That's cool.
    i'm not really up to speed on html versions but i'm pretty sure you'd've got the same error validating that tag in earleir versions too
    r937.com | rudy.ca | Buy my SitePoint book: Simply SQL
    "giving out my real stuffs"

  5. #5
    SitePoint Evangelist cgacfox's Avatar
    Join Date
    Feb 2005
    Location
    Colorful Colorado
    Posts
    412
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    I have corrected the problem and it came through with flying GREEN colors. Now the only thing that is bad is the Google Map link and oh well...I will deal with it!

  6. #6
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    23,599
    Mentioned
    411 Post(s)
    Tagged
    7 Thread(s)
    Quote Originally Posted by cgacfox View Post
    Aha, so I only need to have img once so img class"" src="" etc for HTML5.
    For any version of (X)HTML.

    The link you gave doesn't work now. A common problem in links is that & is unencoded, and the error would go away if you change it to &amp; — but that's a wild guess.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •