Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3

Thread: html validation

  1. #1
    New to the CF scene
    Join Date
    Feb 2010
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    html validation

    Hi there,
    I'm having a problem with html validation.
    It's says: Attribute
    Code:
    "rel" exists, but can not be used for this element.
    
    …title="madone76" alt="madone69" rel="Antes: 7000 €
    Any idea how to solve it ?

    Apparently it's a doctype problem. Mine looks like that:
    Code:
    <!DOCTYPE html PUBLIC "-//w3c//dtd xhtml 1.0 transitional//en" "http://www.w3.org/TR/xhtml1/dtd/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    thanks

    Jan

  • #2
    Senior Coder ahallicks's Avatar
    Join Date
    May 2006
    Location
    Lancaster, UK
    Posts
    1,134
    Thanks
    1
    Thanked 57 Times in 55 Posts
    By the looks of that you have the rel attribute on an image tag? This will not validate because rel can only be applied to specific tags in XHTML.

    For clarification:

    http://www.w3schools.com/tags/tag_img.asp

    Why are you not using a strict doctype? Seems to me, if you're going to use a stricter language you may as well use the strictest form of that language?!
    "write it for FireFox then hack it for IE."
    Quote Originally Posted by Mhtml View Post
    Domains are like women - all the good ones are taken unless you want one from some foreign country.
    Reputation is your friend

    Development & SEO Tools

  • #3
    Regular Coder
    Join Date
    Aug 2005
    Location
    MS
    Posts
    829
    Thanks
    10
    Thanked 79 Times in 77 Posts
    For info on the "rel" attribute:

    Other link relationships
    HTML <a> rel Attribute
    Rel attribute

    HTML 5 (RelExtensions)

    DocTypes. As stated, just as well go for XHTML 1.0 Strict. :P
    ☠ ☠RON☠ ☠


  •  

    Posting Permissions

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