When using standard HTML code in Webpage creation _ HTML/Xhtml _ webpage Creation
Source: Internet
Author: User
The most common mistake that many website designers make is that when their web pages are displayed normally under IE, they think their code is correct, and sometimes they complain that their website rankings are not satisfactory, after a brief look at its website, we can find that the HTML code is filled with all kinds of errors. On the basis of that Code, no matter how much effort is made to optimize the website results, it may be all done! The most common mistake that many website designers make is that when their web pages are displayed normally under IE, they think their code is correct, and sometimes they complain that their website rankings are not satisfactory, after a brief look at its website, we can find that the HTML code is filled with all kinds of errors. On the basis of that Code, no matter how much effort is made to optimize the website results, it may be all done!
In fact, IE is a browser with a high degree of error tolerance for HTML code. Although we can attack Microsoft for various reasons, however, Microsoft's efforts on the accessibility and availability of its product operations cannot be erased. -- Normal display of Web pages under IE does not mean that there is no problem with the HTML code of the page, or even can be extended, the normal display of Web pages in multiple browsers does not mean that the HTML code is completely legal and valid. After all, any browser must ensure basic fault-tolerant functions. Otherwise, this will happen even if the HTML page is not displayed normally only because of a point in network transmission, which is still frequent today when the network bandwidth is still insufficient.
What is valid HTML code?
Simply put, our Web pages are composed of HTML (Hypertext Markup Language: Hypertext link Markup Language) elements, even for dynamic pages such as ASP and PHP, it is also used by the SERVER to render ASP or PHP statements into the corresponding HTML elements and upload them to the client; for JavaScript, it is converted to HTML by the client.
Like other languages, HTML also has its own syntax rules. Both browsers and search engine Spider are analyzing the content in Webpage code based on these rules. However, many times, even for skilled users, some HTML code errors are inevitable during HTML page construction, not to mention the HTML redundancy and bloated problems caused by most WYSIWYG editors.
If there are no elements on the page that violate the HTML standard syntax specification, it can be called a legal and valid HTML code.
The importance of valid HTML code to SEO
To enable search engines to include our Web pages, we can talk about website optimization and website promotion on this basis. The premise is that the search engine Spider can understand our Web files. The search engine Spider reads the webpage according to the HTML specification. By analyzing the HTML code, Spider can determine the webpage content and the relevance of corresponding keywords.
It should be clear that the difference between the search engine Spider and the browser is that its fault tolerance capability is much worse than that of the browser. If the Page code contains HTML code that cannot be interpreted, it may stop reading this page or even crawling on our website. More serious errors may even cause it to discard the content of other pages on the collected website.
Although most search engines are trying their best to improve Spider's fault tolerance capabilities so that they do not affect content collection when HTML code encounters a general error. However, in many cases, the content of the entire page is ignored due to the missing tag.
On the other hand, valid HTML can also ensure that Web pages can be correctly interpreted in a variety of browsers to avoid the situation where the same page is normally displayed in IE but is severely deformed in Mozilla (of course, can not be completely avoided), which is also of great benefit for improving the availability of the website.
How can I verify the validity of HTML code?
There are many similar free services on the Internet that can help us verify whether webpage code is valid and valid. The most famous among them is W3C HTML Validator, which is developed by W3C (World Wide Web Consortium) the official free service project only needs to enter the HTML address to be verified on the page or upload an HTML file on the local machine. It will return the verification result soon and check whether it is correct, which of the following are errors and how to improve them.
W3C HTML Validator also provides the CSS file verification service.
Must I pass W3C verification?
The answer to this question is not so absolute.
Theoretically, legal HTML code enables search engine Spider to easily collect website page content information. On the other hand, not all HTML code errors affect Spider crawling. That is to say, it is acceptable for Spider to have a small number of HTML errors, must I pass W3C certification?
On the other hand, for example, in the Mark Daoust test, there are even a small number of HTML code errors in the Google ranking, which are even more dominant in the Google ranking. Of course there is a lot of controversy, however, it proves that there are at least a few HTML code errors that do not affect the ranking of webpages in SERP.
In my opinion, if you are not familiar with HTML, you do not need to force 100% to pass W3C verification, after all, it is essential to put more time and effort in the direction where efforts should be made, such as creating content and links, but ensure that there are no major serious errors in HTML code. Of course, if you are familiar with the HTML language, how can you make some effort to ensure it is completely correct? Therefore, we do not have to pass W3C certification, but at least make sure that it is displayed normally in a variety of browsers, and ensure that the search engine's Spider can be analyzed normally.
Improve the efficiency of HTML code
As we mentioned above, many WYSIWYG editors cause HTML redundancy and bloated problems, which are quite common in many Chinese websites. WYSIWYG editors, such as FrontPage and Dreamweaver, usually generate unnecessary redundant code when they modify a webpage. When the HTML file on the page contains a large amount of redundant code, the file will become bloated, which will not only reduce the speed of opening the page, damage the efficiency of the page, at the same time, it will seriously affect the ranking of search engines on a considerable number of webpages.
Instead of putting effort into the W3C certification, I personally think that it is better to put more energy into reduced code, such as introducing CSS, to ensure the code is clean and concise. Such optimization results will be more obvious.
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service