In fact, when we use Dreamweaver and other software to design and produce web pages, we have already started to use Web standard technology.In Dreamweaver or other web editor environmentWebsite DesignIn fact, the web editor automatically writes code snippets that conform to various technologies in the web standard for us.Although we have been using editors or other means to write Web standards, it does not mean that our web pages are standard compliant.Web page design that truly conforms to standards refers to the ability to flexibly use Web standards to separate the structure, performance and behavior of Web content - that is, performance and content are separated, and the most scientific and reasonable structure is used to build a website, so that the website is easy to use, reliable, and easy to maintain, which is the ultimate goal of standard design.The purpose of this book is to bring readers new website coding design methods that meet this standard.
The separation of presentation and content is the core purpose of the current Web standards.
Content refers to specific information and only refers to the body of the information.The body is marked as independent parts through XHTML structured language, such as left column, right column, news list, etc.
Performance refers to the form of information display, such as the design of font size, font and typesetting, which is called performance.The advantages of using performance and content separation technology mainly lie in the following aspects:
1. Efficient development and simple maintenance
In the process of website design, the most desirable thing for developers is to be able to develop efficiently and maintain simply, which is the key to website development and operation costs.The efficient development brought about by the separation of performance and content means that specific content and style design can be separated through the separation technology of content and performance, so that the same design can be reused.After defining the design style of an element on the interface, the design style code can be reused in another information content through the separation of design and content. The code can be directly applied or inherited for extension, so as to reuse the design style, which can reduce repeated code writing and speed up development efficiency.
The style code reuse method also plays a role in the maintenance. By modifying the same code segment, all areas of the reused code can change the style at the same time, so that the maintenance is simple and efficient.It is worth noting that due to the separation of content and presentation, style designers can focus on the presentation of styles without repeatedly defining style content, which has greatly improved readability and maintainability.
The style code reuse method also plays a role in the maintenance. By modifying the same code segment, all areas of the reused code can change the style at the same time, so that the maintenance is simple and efficient.It is worth noting that due to the separation of content and presentation, style designers can focus on the presentation of styles without repeatedly defining style content, which has greatly improved readability and maintainability.
2. Cross platform availability of information
By separating content from design, we can enable cross platform transformation of information at a lower cost.
Because the content and design have been separated, we can replace the style of other devices. For example, for handheld computers or game console terminals, we can have different style representations on another device by replacing a style design file to meet the screen needs of different devices. The content of web pages does not need to be changed.