


Several misunderstandings about web standards for beginners_CSS/HTML
I am very happy to see that many designers are beginning to pay attention to and try to use web standards to create web pages. However, we found several problems from netizens’ questions and production, and I would like to remind you here:
1. Standardization is not done just to pass the verification.
The original intention of web standards is to separate content (structure) and presentation, which is to separate styles and put them in separate css files. The advantage of this is that content and performance can be processed separately, and it also facilitates search and content reuse.
W3C validation only helps you check whether the writing of XHTML code is standardized and whether the CSS attributes are within the CCS2 specification. The standardization of the code is only the first step. It does not mean that if it passes the verification, my web page will be standardized. We are not standardizing for the sake of fame or showing off to others: "Look, my page has passed the verification". Our purpose is to make our web design work more efficient, to reduce the size of the web page, and to be able to use it in any browser. and browse normally on network devices.
Please calm down and carefully study and understand the connotation of web standards. The Internet is already full of impetuousness and vanity. Please do not bring this trend to the application of web standards. Doing so will only affect and damage the promotion of web standards.
2. Don’t use traditional table thinking to nest divs
"CSS layout is to replace the original table with div. It used to be table nesting, but now it is DIV nesting." This view is wrong of!
Please break out of the confinement of the original table layout and abandon the way of thinking of placing pictures and content one TD after another. We said above that the purpose of web standards is to separate content and performance. You can think of it this way. The page contains only content. Without modification, it looks like a white page with some text and pictures ( This picture refers to the picture in the content, which is a picture with real meaning). These text pictures are just listed in sequence, with only structure and no style. Then add performance, use all modified pictures as backgrounds, and use CSS to define the position, font, color, etc. of each piece of content.
The page produced in this way has content and performance separated. That is to say, when you remove the css file, what is left is clean content. In this way, you can read it in a text browser, read it on a mobile phone or PDA, and modify the CSS at any time to achieve revision.
3. There is no need to create an ID for each piece of content
Some netizens complained that the css file was too large and complicated. Looking carefully at their code, I found that the reason is that they define a div and create an ID for each piece of content or even each sentence. On the one hand, this is due to unfamiliarity with style sheet applications, and on the other hand, it also shows a lack of thorough understanding of web standards.
We know that content has a structure (if you don’t understand, please read: [url=http://www.w3cn.org/article/tips/2004/43.html]Understand the separation of performance and structure[/ url]), we can use the same style to define the content of the same structure, such as the same level of title, text, and pictures. For styles that are referenced multiple times, you can use class to define them, and you don’t need to use id for each one; in addition, it does not mean that you must use
, you can completely replace it with
, which are also block-level elements and have the same seven parameters of the box model,
Just convenient for floating.
As for adding extra divs just for line height, spacing, and a modified image, I think you can quickly omit these with the application and understanding of CSS. We are opposed to using DIV nesting to replace table nesting. This makes no sense and cannot reflect the structuring of the content. I hope everyone will study CSS more and write the most concise and effective style sheets.
4. Don’t give up easily just because of a little setback
I think this is a matter of attitude and approach, not just for learning web standards. Learning any new knowledge and accepting new concepts is difficult, especially when it requires you to change your existing habits and thinking. The only question is: do you think learning web standards is worth it? You can ask yourself: Do you recognize the benefits brought by web standards (simplified code, accelerated development, compressed file size, increased download speed, better usability, more users, easier maintenance, multi-platform compatibility )? Do you feel that world-wide XML is still far away from you? Do you think your current knowledge of HTML is enough?
Since 1999, web page production technology has not progressed or changed much in China (except for the rise of flash), but the pace of progress abroad has never stopped, xhtml1.0, xhtml1.1, xml, xsl ..., W3C and major software companies are constantly researching and advancing web technology to make it more convenient, more effective, and more powerful. The application and promotion of web standards have been carried out abroad for more than eight years (starting from Zeldman's web standards organization website). Although there are many difficulties, it is gradually being accepted and recognized by people. Why are we still intoxicated with the "prosperity" on the surface of the website, without thinking about the essence behind the page.
Do you want China to continue to lag behind? Are you willing to continue to lag behind? All decisions are yours.

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics



If you’ve recently started working with GraphQL, or reviewed its pros and cons, you’ve no doubt heard things like “GraphQL doesn’t support caching” or

The Svelte transition API provides a way to animate components when they enter or leave the document, including custom Svelte transitions.

How much time do you spend designing the content presentation for your websites? When you write a new blog post or create a new page, are you thinking about

With the recent climb of Bitcoin’s price over 20k $USD, and to it recently breaking 30k, I thought it’s worth taking a deep dive back into creating Ethereum

npm commands run various tasks for you, either as a one-off or a continuously running process for things like starting a server or compiling code.

The article discusses using CSS for text effects like shadows and gradients, optimizing them for performance, and enhancing user experience. It also lists resources for beginners.(159 characters)

I was just chatting with Eric Meyer the other day and I remembered an Eric Meyer story from my formative years. I wrote a blog post about CSS specificity, and

No matter what stage you’re at as a developer, the tasks we complete—whether big or small—make a huge impact in our personal and professional growth.
