Validation is a process of checking the markup elements of a web page in compliance with the standards and
recommendations set by the World Wide Web Consortium(W3C). The HTML validator is used to check the validation.
The validator is a quality assurance program used to check for syntax errors of HTML elements.
Once you have checked your code and corrected any errors, the validator confirms you that your code is compliant or validated.
Code validation is most important and worthwhile because the validated code is most likely to be interpreted accurately by the majority of user agents. This gives you a better chance to render your pages on search engine to a large audience.
HTML5 Code Validator
W3C provides online service for markup validation. There are several other validators exist, but W3C is most preferred.