Validating xhtml code
Note that I also left off the period after “This is a sentence” above, which violates the rules of grammar, but likely doesn’t cause any problems in communication.
Since validation is comparing your code to W3C standards I think the best way to validate your code is using the W3C validation tools.
Validating a website is the process of ensuring that the pages on the website conform to the norms or standards defined by various organizations.
Validation is important, and will ensure that your web pages are interpreted in the same way (the way you want it) by various machines, such as search engines, as well as users and visitors to your webpage.
Note: if you are not sure what HTML and CSS mean, please read What are HTML, CSS, Java Script, PHP and Perl? For those unfamiliar with the term, "validating" a page is just a jargon-filled way of referring to the use of a computer program to check that a web page is free of errors.
In particular, an HTML validator checks to make sure the HTML code on your web page complies with the standards set by the W3 Consortium, the organisation ("organization" in US English) that issues the HTML standards.
There are a few which will also tell you which CSS features are supported by which browsers (since not all browsers are equal in their CSS implementation).
Again, you can get free validation for your style sheets from the W3 Consortium: https://jigsaw.w3.org/css-validator/ There are numerous other validators around, both free and commercial, focusing on different aspects of your web page.Conforming to standards and regulations is one of the many ways you can make your website universally understood.Make sure your codes and styles validate across the board.That also means that it will be accessible to more people, across more web browsers and operation systems.Having an accessible website is also regarded as good web design practice.If there are any errors, the validator will inform you of this and will also inform you where the errors are located so that you can fix them.