After reading Cragle's article "Is it necessary to reconstruct the website with Div+Css?", I have some thoughts that I am not happy with. I also mentioned in the comments of the article that I had fired two artists who insisted on using div technology, and they were criticized. Some friends are opposed to it, but a friend who is a technical director also posted a message to express his support. A very classic saying is: "Websites are for people to see. Not for machines. So what if it complies with w3c standards?"
Speaking of web design, I entered the industry in 2000, so I should still say a few words. Let me talk about the two artists I hired first.
I was planning to build a new company with a friend and hired an art design company to build an image website. When we were talking about salary, he said, if you want me to use divs to make pages, the salary should be higher. If you want to go high, go high. If you do really well, it doesn't matter. In fact, that was when I started to study this thing seriously.
But to my surprise, in the promotional advertisement on the company's website, this man actually added this sentence (for promotion, I don't have time to write so many slogans, so let him give full play to it), the content is: "More than 90% of domestic websites will be eliminated, and div+css will become the future standard."
Maybe he was more confident, but he didn't go into it. What he never expected was that it took half a month to build this simple promotional website. The page design was very poor - the color matching was not good, and it was finally overthrown by investors. After half a month of redesign, it was overturned again. Although I always emphasized that artists should learn website structure design, color matching, etc., he ignored it. Finally, I let him leave.
Later, the company revised the version again, which took a week to create a very beautiful table structure.
At this time, I didn't realize that div would be more misleading in the eyes of some newcomers than I thought, until the second artist came to work.
He just graduated and worked very diligently, but he was definitely poisoned.
On the first day at work, he pointed at IE on my computer and said, this thing of yours is very unsafe and very bad. You must use Firefox. Only Firefox is the right way. From now on, the world will be dominated by Firefox. I was stunned. At that time, the Internet was full of Firefox advertisements - many webmasters, in order to earn US dollars, unkindly belittled IE and praised Firefox, just to attract visitors to download.
This guy also likes to use divs to write pages, and shows great disdain for tables. He can't even tolerate the word table in his eyes. He starts spending 90% of his time every day building HTML files and CSS style sheets, even for a px uses a ruler to measure on the screen - it's too exaggerated, but only 10% of the time is spent on the overall design and art production of the page. At the same time, in order to save a few bytes, a picture is cut into a picture with very small bytes. The entire picture folder is filled with tiny pictures.
Of course, he didn't come up with a work that satisfied me in the end. For various reasons, our revisions were very frequent, sometimes very big. I couldn't wait for him to pile up code and test for a day just to change a small thing. N browsers. After all, when running a company, you have to consider costs. I only have 8 hours of working time for him every day. I couldn't wait, so I had to ask him to leave.
To be honest, I am not against div+css, but everything has its advantages and disadvantages. Everyone has talked about the advantages of div+css a lot, so I will talk about several disadvantages of the fanatical pursuit of div+css:
1. It greatly increases the development time and also increases the development cost. Of course if you are a journeyman or can work overtime day and night without worrying about not getting overtime pay, then probably not.
2. It greatly increases the difficulty of collaborative work. Many programmers who have never learned div are at a loss when it comes to the div pages produced by artists. If they make a slight mistake, the entire site may be miserable. Of course, if you are a jack-of-all-trades and can do it all, you may not.
3. Increased development risks. An error in one css file may cause the entire site to crash, which is terrible. A large number of access links calling static css files at the same time may cause concurrency errors and call failures.
A few years ago, when I was sitting and playing in a friend's car, he asked me in a spitting voice, "Do you know how to do web2.0?" I said that web2.0 is not a technology, but web2.0 is an idea. It’s not that changing to div+css is 2.0. He said it was wrong, wrong, you are behind the times, your 1.0 website will soon fail, and I am going to invest in the 2.0 website soon and plan to launch it on the market. A few years later, the sales of my 1.0 website were still growing steadily, but his 2.0 was never mentioned again.
div is not a bad thing, but it cannot be exploited.
Regarding some div parties that maintain divs, I would like to talk about a few misunderstandings, and also give some reminders to friends who are new to the industry.
Misunderstanding 1: The W3C standard is to abandon all tables.
After checking the W3C help file, I did not find that W3C has abandoned the table definition, and pages made using tables can also pass W3C validation. In fact, from the creation of the web page to the present, table has always been It is the standard W3C definition.
Misunderstanding 2: div+css can simplify code.
Everyone says that the layout of DIV simplifies code, but the code saved by using DIV instead of TABLE is occupied by CSS (style), and most of these styles are used to control the layout of DIV. Once css goes wrong, the consequences will be disastrous. Moreover, the fanatical pursuit of doubling the size of tens of K pages is completely unnecessary. Everyone knows that when a web page is opened, the real bandwidth occupied is not the web page itself, but pictures, flash, etc. A page of 100 K may need to be downloaded. There are several megabytes of pictures, flash, and videos. Nowadays, the development speed of hardware far exceeds the development speed of software, and bandwidth is gradually not a problem. The fanatical pursuit of code simplification is a waste of time.
Misunderstanding 3: Using divs can make it easier to be searched by search engines.
There is currently no evidence that using divs can make it easier to be included in search engines. Maybe this just exists in beautiful imagination.
I have always believed that building a website requires only four words: “content is king”. There are four words to run a company: “increase revenue and reduce expenditure”. Everything else is empty.
It's not wrong to pursue new technologies, but it's wrong to go into extremes. There's nothing wrong with using divs. There are indeed many benefits, but you must not become paranoid about divs.