Some points of using standard HTML code in web page making

Time:2022-1-9

The most common mistake many website designers make is that when their web pages can be displayed normally under ie, they think their code is correct. They even often see people complaining that their website ranking is not ideal. A simple look at their website can find that HTML code is full of all kinds of errors, On the basis of such code, no matter how much effort you make to optimize the website, the result may be put into water!
The most common mistake many website designers make is that when their web pages can be displayed normally under ie, they think their code is correct. They even often see people complaining that their website ranking is not ideal. A simple look at their website can find that HTML code is full of all kinds of errors, On the basis of such code, no matter how much effort you make to optimize the website, the result may be put into water!
In fact, ie is a browser with high fault tolerance for HTML code. – as an aside, although we can attack Microsoft for various reasons, Microsoft’s efforts in the ease of operation and availability of its products can not be denied—— The normal display of web pages under ie does not mean that there is no problem with the HTML code of the page. It can even be extended. The normal display of web pages under a variety of browsers does not mean that the HTML code is completely legal and effective. After all, any browser should ensure the basic fault-tolerant function, otherwise, It will happen, even if the HTML page display is abnormal only because of a little bit in the network transmission, which is still frequent today when the network bandwidth is still tight.
What is legal and valid HTML code

In short, our web page is composed of HTML (Hypertext Markup Language) elements. Even for dynamic pages such as ASP and PHP, the server renders ASP or PHP statements into corresponding HTML elements and sends them down to the client; For JavaScript, the client converts it to HTML.
Like other languages, HTML also has its own syntax rules. Both browsers and search engine spiders analyze the content in web page code according to these rules. But many times, even for skilled personnel, it is still inevitable to make some errors in HTML code when building HTML pages, not to mention the problem of HTML redundancy and bloating caused by most WYSIWYG editors.
If there are no elements that violate the HTML standard syntax specification in the page, it can be called legal and effective HTML code
The importance of legal and effective HTML code to SEO

To make the search engine include our web pages – on this basis, we can talk about website optimization and website promotion – the premise is that the spider of the search engine can read our web documents. Search engine spider reads Web pages based on HTML specifications. Through the analysis of HTML code, spider can judge the content of web pages, and on this basis can judge the relevance of corresponding keywords.
It should be clear that the difference between search engine spider and browser is that its fault tolerance is much worse than that of browser. If there is unexplained HTML code in the page code, it may stop reading the page or even crawling in our website, More serious errors will even cause it to discard the collected content information of other pages in the website at the same time.
Although nowadays, major search engines are also trying their best to improve the fault tolerance of spider, so that it can not affect the collection of content in case of general errors in HTML code. But many times, it still happens that the content of the whole page is ignored due to the omission of a close tag.
On the other hand, legal and effective HTML can also ensure that web pages can be correctly interpreted in a variety of browsers, so as to avoid the serious deformation of the same page under IE and Mozilla (of course, it can not be completely avoided), which is also of great benefit to improve the usability of the website.
How to verify the validity of HTML code?

There are many similar free services on the Internet that can help us verify whether the web page code is legal and valid. The most famous one is W3C HTML validator, which is a free service officially launched by W3C (World Wide Web Consortium). On its page, you only need to enter the HTML address to be verified or upload an HTML file on the local machine, It will quickly return the verification results, whether they are correct, what are the errors and how to improve them.
At the same time, W3C HTML validator also provides validation services for CSS files.
Must it pass the W3C verification?

The answer to this question is not so absolute.
In theory, legal HTML code can make it easier for the spider of search engine to collect the content information of website pages. On the other hand, not all HTML code errors will affect spider’s crawling, that is to say, a small number of HTML errors are acceptable to spider. Then, do you have to pass W3C certification?
On the other hand, in mark Daoust’s test, even the metaphor (not sure underground conclusion) has a small amount of HTML code errors, which can be more dominant in Google ranking. Of course, this is very controversial, but at least it proves that the existence of a small amount of HTML code errors does not affect the ranking of web pages in SERP.
Personal point of view, if you are relatively unfamiliar with HTML, you don’t have to force 100% to pass the W3C verification. After all, put more time and energy into the direction you should really strive for, such as creating content and links, but ensure that there are no major serious errors in HTML code. Of course, if you are proficient in HTML, why not take a little effort to ensure that it is completely correct? Therefore, what we need to do is not necessarily to pass the W3C certification, but at least ensure that it is displayed normally in various browsers and that the spider of the search engine can analyze normally.
Improve the efficiency of HTML code

Previously, we mentioned the problem of HTML redundancy and bloating caused by many WYSIWYG editors, which is quite common on many Chinese websites. WYSIWYG editors such as frontpage and Dreamweaver, especially when they modify a web page, often produce a lot of unnecessary redundant code. When there is a lot of redundant code in the HTML file of the page, the file will become bloated, which will not only reduce the opening speed of the web page and damage the efficiency of the web page, but also seriously affect the search engine ranking of a considerable web page.
Instead of putting energy into certain W3C certification, I personally think it’s better to put more energy into reducing the code, such as the introduction of CSS, so as to realize the cleanness and simplicity of the code. This optimization effect will be more obvious.