tags:

views:

68

answers:

3
+2  Q: 

Check valid html

Is there an easy way in C# to validate an html file (.htm) ?

A: 

If you mean parse a HTML file, there's HTML Agility pack

Tony
A: 

Maybe you want to checkout this and this.

Ngu Soon Hui
+1  A: 

You could try the article C# Validate XHTML on Dot Net Perls.

If you are not tied to doing this in C#, then usually the best way to validate HTML is using the W3C validation service.

You could of course, write some kind of test harness in C# which pushes all your HTML through the W3C validator, if it makes sense in your case.

AdamRalph
The first one does do the trick, thanks!
Patrick Peters