title: Check if HTML snippet is valid with JavaScript
body: <p>I need a reliable JavaScript library / function to check if an HTML snippet is valid that I can call from my code. For example, it should check that opened tags and quotation marks are closed, nesting is correct, etc.</p>
  <p>I don't want the validation to fail because something is not 100% standard (but would work anyway).</p>