How to validate this as a valid HTML code in Selenium?
I am testing a class that takes 1 string and generates an HTML page around that string. So I pass it the string Math and it returns to me a whole HTML page as a string containing that Word and with matching <td></td> a header <h3></h3> and a form. How do I validate this as a valid HTML code?
Yes, it is important to validate HTML. There are W3C standards against which you can validate it. You can use various tools like the W3C Html validator, or Web Developer addon of FireFox. There are several such paid an unpaid tools that can help you validate your HTML. It helps in page optimization and SEO.