A way to design reusable web sites with XHTML and CSS 1th/4 page _ Experience Exchange

Source: Internet
Author: User
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:

    • Create a more visible separation between the document structure and the representation.

    • An application that re-represents HTML as XML.

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

  • Related Article

    Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.