SitePoint Sponsor

User Tag List

Results 1 to 8 of 8
  1. #1
    SitePoint Evangelist
    Join Date
    Jun 2011
    Location
    London UK
    Posts
    495
    Mentioned
    5 Post(s)
    Tagged
    0 Thread(s)

    Recommended validator

    So far I've been using "validator.w3.org/" but it seems to have a few oddities, one of which is not regocnising
    Code:
    target="_blank"
    Are there any online validators that are better?

  2. #2
    Robert Wellock silver trophybronze trophy xhtmlcoder's Avatar
    Join Date
    Apr 2002
    Location
    A Maze of Twisty Little Passages
    Posts
    6,316
    Mentioned
    60 Post(s)
    Tagged
    0 Thread(s)
    What do you mean it doesn't recognise the special value of target _blank that renders the link in a new, unnamed window, I suspect you are using HTML 4.01, it's only available in Transitional.

  3. #3
    Mouse catcher silver trophy Stevie D's Avatar
    Join Date
    Mar 2006
    Location
    Yorkshire, UK
    Posts
    5,881
    Mentioned
    122 Post(s)
    Tagged
    1 Thread(s)
    Quote Originally Posted by benbob View Post
    So far I've been using "validator.w3.org/" but it seems to have a few oddities, one of which is not regocnising
    Code:
    target="_blank"
    Are there any online validators that are better?
    The reason the validator doesn't recognise it is probably that you have set a Strict doctype, and target="_blank" is not valid except with a Transitional doctype. The reason for this is that it is recommended not to force a new window, and if you insist on doing that then you should use Javascript to do it.

  4. #4
    SitePoint Evangelist
    Join Date
    Jun 2011
    Location
    London UK
    Posts
    495
    Mentioned
    5 Post(s)
    Tagged
    0 Thread(s)
    Thanks folks, that'll be the problem then. Solution: not to worry.

  5. #5
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    24,114
    Mentioned
    448 Post(s)
    Tagged
    8 Thread(s)
    I have a feeling it's allowed in HTML5, but I'm not sure if I'm reading that gibberish right. There is an HTML5 validator that you could try: http://html5.validator.nu/
    Facebook | Google+ | Twitter | Web Design Tips | Free Contact Form

    Forum Usage: Tips on posting code samples, images and more

    Forrest Gump: "IE is like a box of chocolates: you never know what you're gonna get."

  6. #6
    SitePoint Member
    Join Date
    Jul 2012
    Posts
    14
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yes, I would think validator.w3.org should be the standard for everyone. Don't they actually publish the standards themselves?

  7. #7
    Mouse catcher silver trophy Stevie D's Avatar
    Join Date
    Mar 2006
    Location
    Yorkshire, UK
    Posts
    5,881
    Mentioned
    122 Post(s)
    Tagged
    1 Thread(s)
    Quote Originally Posted by Tanya77 View Post
    Yes, I would think validator.w3.org should be the standard for everyone. Don't they actually publish the standards themselves?
    But that's kind of the point. HTML5 has not yet been published as a standard. It is still a draft, and will probably remain a draft for a good few years yet. Until it becomes published a standard, it would be wrong for W3 to provide a validator against something that isn't a standard. Pages that are correct according to the current draft would appear to "pass" the validator, but might then become invalid when the standard is published in a slightly different form from the current draft, and that wouldn't be acceptable.

  8. #8
    SitePoint Member
    Join Date
    Jul 2012
    Posts
    14
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Stevie D View Post
    But that's kind of the point. HTML5 has not yet been published as a standard. It is still a draft, and will probably remain a draft for a good few years yet. Until it becomes published a standard, it would be wrong for W3 to provide a validator against something that isn't a standard. Pages that are correct according to the current draft would appear to "pass" the validator, but might then become invalid when the standard is published in a slightly different form from the current draft, and that wouldn't be acceptable.
    Ahh, thanks Stevie D. I learn something new every day on here!


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
  •