This article discusses:
Using WEB standards
CSS Control Adapters
asp.net 2.0 themes and master Pages
This article uses the following techniques:
asp.net 2.0
I have to admit I didn't think Web standards were important at first. Like most people, I started to write Web browsers when they first appeared. At the time, I thought that closing each HTML paragraph mark would reduce my productivity and would unnecessarily occupy the user's valuable 28K portion of the bandwidth. So, I don't close it. As long as the browser can pass, I do not care.
But since then I've come to realize the universal importance of Web standards for future web and web-based software. Of course, WEB standards are much more than simply closing HTML tags. They are related to whether software components can be well applied to future content.
In addition, to conform to standards such as XHTML, cascading style sheets (CSS), XML, and so on, Web applications should be friendly to search engines, accessible, Easy-to-understand URLs, and other accepted practices, making it easier to find and use. WEB standards also require special attention to the code structure of the site for easier maintenance in the future. In this article, I'll explain why everyone, especially programmers who write server controls, should follow WEB standards.
Using WEB standards
The impact of WEB standards can be divided into four categories: the legality of the Code, site navigation, accessibility, and the separation of content and design, as shown in Figure 1. If you solve the major problems in these categories, you generate code that is basically standard-compliant. Let's look at each category individually.
Figure 1 WEB Standard Classification
Standard |
Description |
Code legality |
According to the standard of the consortium, the website must use legitimate XHTML and CSS, and the format is correct. This ensures that the browser is supported as much as possible, renders faster, and makes the code easier to understand. |
Site Navigation |
Sites should have a site map and URL-friendly layered structure. Users should be able to determine their location in the site based on the URL. |
Accessibility |
Web sites must be accessible to users with disabilities and should be accessible through a variety of browsers and devices. |
Separation of content and design |
Web sites must use style sheets to define layout and representations (content in XHTML). |