Validation error according to scheme 4011 36. Regional information system in the field of procurement of the Republic of Sakha (Yakutia). Using Business Rules for Validation

Analysis of site validation errors


Finally, I had some free time between the 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 validation of a website, html and css code is, why it is needed and how to bring a website to standards using a specific example.

What is site validation?

In simple words, this is a test for compliance with standards. So that any browser can display your site correctly. The validity of the site doesn’t have a big impact on promotion, but it certainly won’t make things worse.

A specific example of passing validation for a website page

Let's take the first page that comes across on my website - Base64 encoding and decoding in Java 8. Let's enter 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) Yes, the picture that emerges is unpleasant: more than a hundred errors and 67 warnings - how do search engines index my blog and people visit it? But let’s not be upset, but let’s learn how to undergo validation and correct mistakes. So, 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”. It is the same. And the fix is ​​simple: add the tag at the very beginning of the page:

Let’s check what we’ve done and see that with this one tag we removed 105 errors and 3 warnings! Now we only have 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">↩↩↩↩↩A This means that the style element does not need a type attribute - it’s superfluous. We have two such comments on the page. A similar warning applies to JavaScript:

Warning: The type attribute is unnecessary for JavaScript resources. From line 418, column 1; to line 418, column 31 ↩↩$(doc We have 8 such errors. We remove these attributes and hurray - another 10 warnings less!

Error: CSS: background: The first argument to the linear-gradient function should be to top, not top. At line 39, column 61 0%,#E8E8E8 100%);↩ border-r The next mistake is that the first argument of linear-gradient should be to top, not top. We'll fix it. Next error:

Error: CSS: Parse Error. From line 65, column 13; to line 65, column 16 margin: 0 auto;↩padd Here I have incorrectly commented css. You just need to remove this line. Or comment out /* and */ differently. I did it the way I used to.

Error: CSS: @import are not allowed after any valid statement other than @charset and @import.. At line 88, column 74 0,600,700,300);↩@import url(// Now we have an import error. Let's move these lines to the very the beginning of the file and it will disappear.

Error: Bad value _blanck for attribute target on element a: Reserved keyword blank used. From line 241, column 218; to line 241, column 295 cookies..php?id=98" target="_blanck" style="display: inline;">Here Next, we don’t like the value of the target attribute, we are told that we need to use “blank” without the underscore in front Let's remove it.

Error: End tag li seen, but there were open elements. From line 379, column 2; to line 379, column 6

    ↩ ↩↩
↩↩↩↩↩↩

↩↩↩

Have questions?

Report a typo

Text that will be sent to our editors: