The goal of the XHTML standard is to replace HTML。 According to the consortium, "XHTML is HTMLSuccessor "(http://www.w3.org/MarkUp/).
XHTML has two main goals:
The advantage of using the XHTML standard is that you only need to design the page once to make the page appear and work in exactly the same way in any modern browser. For example, after a standard build, pages are displayed in the same way in Internet Explorer, Mozilla Firefox, Netscape Navigator, Opera, Camino, and Safari, without any additional work done. and XHTML standards make it easier for WEB sites to access devices like smartphones, disabled computers, and more.
Because the XHTML standard requires creating a more visible separation between the document structure and representations. Therefore, it is necessary to use CSS style sheets. CSS plays a very important role in Web pages, and its use has always been a hot topic of discussion. CSS is a shorthand for cascading style sheet, translated as "cascading style sheets". In 1997, the HTML4 standard was promulgated and the first standard CSS1 for the stylesheet was released, and the CSS2 version was released in May 1998 after the CSS1 version.
The purpose of the inventor of CSS is to remove the representation element, i.e. the content should be tagged according to what the content represents, and the stylesheet should be used to beautify the content. This is consistent with XHTML's goal of separating the structure and presentation of the document (the B, I, and IMG tags (as well as the big, small, and TT) and not even the use of BR in XHTML 2.0, ready to be removed from future releases. The reason is that most of the tokens are descriptive. Their sole purpose is to give browser instructions about how their content should be displayed, but without providing information about what their content is. So they are the best partners. For more information on XHTML2.0, see: http://www-128.ibm.com/developerworks/cn/xml/x-wa-xhtml/index.html
CSS used to be used to define the properties of a font, and now we will use it to control the display of the entire page in the new standard. However, we have to do something different from the previous ones to accommodate this new change, such as using p instead of tables, using structured, semantic markup, and so on. Thanks to the new approach, we can now easily design reusable CSS (used in multiple Web sites of the same style file) and skin-resurfacing Web sites (one site uses many different styles of styles).
For an example, see the information portal of the Sichuan Construction department , the interface switch is shown in the upper right, 1. For time reasons, the XHTML and CSS checksums are not validated, but the principle is the same.
Figure 1: Interface style switching