views:

26

answers:

1

What is the quickest way to test validity of any xhtml css code snippet (not whole page} in W3C validator? and give link of that test in forum/question/discussion.

code snippet like this

<ul>
  <li>Item one</li>
  <li>Item two</li>
  <li>Watch, you can easily nest list items: This item has some sub-items</li>
  <ul>
    <li>Sub-item one</li>
    <li>Sub-item two</li>
    <li>Shall we do a 3rd nested list?</li>
    <ul>
      <li>OK</li>
      <li>Your browser should automatically use different bullet styles for each level.</li>
    </ul>
  </ul>
</ul>
A: 

Look at the extra options in the validator, there is one to validate a HTML fragment. Bookmark this to jump straight to it: http://validator.w3.org/#validate_by_input+with_options

You can't post a link to the validation output, because validating by direct input uses POST (through form submit), not GET (though URL). The only way to "share" the validation is to validate by URI.

You could keep a "template" HTML file on your computer with a doctype and <body> tag (look at what the fragment validation I mentioned above adds to your code), upload that file to a folder in your web space and share the validation link for that.

DisgruntledGoat