Why a valid code is needed and how to eliminate validation errors. Lead Form Validation - A Complete Guide Token Validation Error on Julia

Analysis of site validation errors


I finally had free time between an endless series of orders, and I decided to start my blog. Let's try to improve it in terms of validation. Below in the article I will tell you what site validation is, html code and css, why is it needed and how to bring the site to standards using a specific example.

What is site validation?

In simple words, this is a check for compliance with standards. So that any browser can display your site correctly. The validity of the site does not have a big impact on promotion, but it definitely won’t be worse.

A specific example of passing validation for a website page

Let's take the first page on my site - Base64 encoding and decoding in Java 8. Let's fill the page address into the validator and look at the result:

Errors found while checking this document as HTML 4.01 Transitional! Result: 105 Errors, 67 warning(s) Yeah, the picture is ugly: more than a hundred errors and 67 warnings - how do search engines index my blog and people visit? But let's not be upset, but learn how to pass validation, correct errors. So the first warning:

Unable to Determine Parse Mode! The validator can process documents either as XML (for document types such as XHTML, SVG, etc.) or SGML (for HTML 4.01 and prior versions). For this document, the information available was not sufficient to determine the parsing mode unambiguously, because: the MIME Media Type (text/html) can be used for XML or SGML document types No known Document Type could be detected No XML declaration (e.g) could be found at the beginning of the document. No XML namespace (e.g ) could be found at the root of the document. As a default, the validator is falling back to SGML mode. Warning No DOCTYPE found! Checking with default HTML 4.01 Transitional Document Type. No DOCTYPE Declaration could be found or recognized in this document. This generally means that the document is not declaring its Document Type at the top. It can also mean that the DOCTYPE declaration contains a spelling error, or that it is not using the correct syntax. The document was checked using a default "fallback" Document Type Definition that closely resembles “HTML 4.01 Transitional”. This is the same. And the fix is ​​simple: at the very beginning of the page, add the tag:

We check what we did and see that with this tag alone we removed 105 errors and 3 warnings! Now we have only 64 warnings left. Let's start taking them apart one by one.

Warning: The type attribute for the style element is not needed and should be omitted. From line 5, column 1; to line 5, column 23 /x-icon">↩