Since the Internet is an organism that is constantly changing and developing, it is very important to build a website that can change and grow with the Internet. It is also very important not to be hurt by the shock wave of the Internet when the online world changes.
Clean markup and building your site using web standards may confuse people, but doing so will save time and money in the long run.
As the network expands, the technologies used in the network are also constantly developing. HTML has existed in the Internet for a long time, and has produced many derivatives during its continuous development.
First came Javascript, then came CSS, XML and AJAX. Widespread adoption of HTML5 is just around the corner, with Firefox, Safari, Opera and Chrome all supporting HTML5 (IE is lagging behind than before).
In this article, I will take Wangyi Technology www.idccss.com as an example to study the basis of network standards. What is it? What does it mean to you? I will point out some very important but in ordinary times An issue that is easily overlooked by everyone.
What does a "clean" mark mean?
In short, this means eliminating clutter and making the standard compatible, using the same tags and structures for different languages.
Clean HTML can reduce the use of unnecessary tags, eliminate unnecessary things, and use very small markup to successfully complete a task. It does not use unnecessary properties such as built-in CSS, structure and organization of each file. Likewise, clean CSS should avoid duplication and make use of existing resources. Standards compliance means that your page conforms to the HTML, CSS, and XML standards published by the W3C. It means using the W3C to detect errors, correct them, and test them until your web pages are 100 percent usable.
Every website design project has a time limit, and clients also want their websites to be completed ahead of time. So web developers and designers are under constant pressure to work faster and more efficiently.
I usually think: "Thinking fast makes you sloppy, and marking up in a clean, standard format takes a lot of time" and usually say: "This already works, this is the best way to do it" Important. "Of course, so far, it has worked for you. But what about next year? What about three years from now? What about a new browser? What impact will it have?
Do you really think search engines will work the same way all day long? You are very picky, and if you don't meet the standards, your apparent page rank will drop.
What happens when the next person has to change the web page you created? What happens if you get hit by a car, abducted by aliens, or can’t find your campsite on a polar expedition? That person has to re-write it. To pick up the mess you left behind, you have to put in all the effort to look at and understand the code. Will this be a simple thing? Who can guarantee that this person will not get a headache and curse you.
So the first time you do it, you have to do it the right way. This is not an annoying thing, it is a philosophy of life. If you do this, it will actually save you a lot of time and money, and make things easier for the people you work with.
You might think that writing whatever you want in built-in CSS would be faster than writing within certain rules. And you might think that it would be faster to write randomly without considering the entire file structure. Later, when you update files or redesign the website, you will spend more time making up for the code you wrote haphazardly than you saved at the time. When you write a new page, the annoying inline code you used before will come back and trap you, and it will take you a lot of time to get rid of it.
Scalability, accessibility, transformation and future standards
The development of mobile browsers is getting more and more promising, and now almost everyone can use their mobile phones to surf the Internet. Assistive technologies are also developing, such as screen readers for the blind and variable interface devices for people with disabilities. You don’t want to put yourself at a disadvantage by not taking these changes into account.
For Internet users from all over the world, the content on your website may be partially translated into multiple languages. Thanks to the Internet Archive, Google's cache, and some other network elements, the page you publish today may be around for a long, long time, even after you've deleted it from your site.
Clean markup and standards go a long way to ensuring that your site can smoothly evolve as the web evolves in the future.
Do’s and Don’ts
Use tags just like you think. For example: h1 is the highest level on the web page, followed by h2, h3 and so on. There should be only one child h1 tag on each page.
Name your CSS standards and IDs meaningfully, and ask yourself if others can tell what the name means. The names are also interesting: #box12 or #commentscale?
Make good use of CSS. For example: if you set a font in a folder, you don't need to set it again in every subfolder, unless you want to set a different font in each subfolder. This may result in your page being opened quickly.
Use your HTML, CSS, and XML to correct as many errors as possible. Also pay attention to the warnings generated.
Carefully review the WYSIWYG generated code and perform any necessary code cleanup. These codes are bloated, redundant, and contain a lot of unnecessary and useless junk.
Don't inject inline formatting and irrelevant tags and attributes just because you're in a hurry.
Don't continue to use it just because it has short-term effects. Just because a page can be used does not mean that its code is standard, has no problems, and is suitable for search engines.