Code validation is a topic that many developers care about — or at least those who want their project to be as solid as possible. But what exactly is validation? Is it important, or is it not worth the effort? How do you check whether a website is valid? This article briefly answers these questions. It’s aimed at beginners as well as non-technical readers.
Validation checks how correctly a page is written, and if errors are found, you fix them. In practice, it’s a step of reviewing, improving, and optimizing the source code. Validation is most commonly used for HTML and CSS. For non-technical readers, here’s a quick explanation:
Since we know what HTML/CSS are, let’s talk about why validity matters.
Here’s a real-life analogy. Imagine two companies selling alarm clocks that look the same and cost about the same. Company A sells products from a certified manufacturer, built neatly with reliable components. Company B sells a similar-looking product, but internally it’s messy and poorly assembled. Repairs are painful and the long-term reliability is questionable.
Website code validity is not far from this analogy. If a website contains many validation errors, it may behave unpredictably: it can render differently across browsers, break layout, or cause performance issues.
As Shaun Anderson from hobo-web.co.uk summarized: what a crawler can read is what it can rank. This ranking affects search visibility. Google does not directly “boost” valid websites over invalid ones, but if the markup is very broken, parts of the content can be misunderstood or skipped.
There are two camps: one says validation is unnecessary, the other says it matters. Browsers are indeed smart and can recover from many mistakes — but relying on that is risky. Validation is a useful second check. So yes: valid code is important, especially for professional work.
There are many tools for this. The most popular are online validators: you paste a URL, and the tool shows errors and warnings, often with hints on how to fix them. The best-known are the W3C validators. For HTML and CSS you can also choose validation “strictness”.
EGTwins uses HTML5, so HTML5 validation is the relevant test. For CSS, Level 3 is usually enough — stricter profiles may complain about things that are not practical to “fix” (vendor prefixes, etc.). The goal is not perfection at any cost — the goal is to avoid broken code. Validators become more useful over time: you learn the common mistakes and gradually write cleaner code “from scratch”. Here are the official tools: HTML validator and CSS validator.
Below is a preview of the validation of egtwins.cz. As you can see, both HTML and CSS validation are OK (green status messages), which means the source code is free of errors.
When your website passes validation, you can add “badges” like these:
On the other hand, here is an example of validation errors from another website. We created a quick demo page for presentation purposes, so the design was not the priority.
Validators typically report both errors and warnings:
“Errors” are actual issues that should be fixed.
“Warnings” are notices — not necessarily problems. If a warning points to a serious risk (rare, but possible),
it should be reviewed; otherwise it can often be ignored.
Sometimes validation issues are caused by third-party code snippets (booking widgets, external embeds, etc.). In such cases, you may not be able to fully fix the issue yourself — so use common sense and evaluate how serious it is.
Finally, validation is not the only factor of a successful website. Websites should be built for people, not robots. Great content and usability matter most. A few validation issues won’t destroy your site — but cleaner code can improve reliability, maintainability, and is also a strong quality signal of a developer’s work.
We hope this article was helpful and that “validation” no longer sounds like a magic word. If you liked it, we’d really appreciate a share and a like.
This article is based on the authors’ experience and the external sources listed below.
Added: 16-10-2020, Authors: Milan Řehoř, Jan Řehoř
External sources: