In fact, CSS is also a powerful tool for separating HTML from data and performance. Stone CSS Oriented Design: COD is very suitable for my taste. It is not easy to get rid of Table Oriented Design. But once it is realized, the system itself achieves division of labor and collaboration: you can change your skin like Winamp, so as to exert your greatest initiative. The most direct example is the MT system used on the website. All styles come from MovableStyle ,.
Requirement: <B> in the XML result set is displayed in red. In fact, it can be implemented through the CSS of the client:
The code is as follows:
First
<Blockquote>
Use CSS to replace <B> indexing </B> HTML tags without using replace
</Blockquote>
Use CSS to replace <B> indexing </B> HTML tags without using replace
In this way:
Defined in CSS: B {color: red ;}
In addition to bold, all <B> are marked with red attributes. To prevent other <B> values on the page from being marked with red, I put the results in one <B>
Blockquote>
And then define in CSS:
<Style> <! --
Blockquote B {color: red ;}
// -->
</Style>
Because of the inheritance relationship of CSS, only <B> in blockquote will be marked with red:
Font-weight: normal can even reduce the font size.
Through this question: draw two conclusions
1. When designing an external search service with indexing, you can use <B> as a marker.
2. On the client side, you can use CSS to implement control.
About: CSS, Accesibility and Standards Links
Postscript:
I have been pursuing the concept of separation of data, structure, and performance in XML, XSLT, and CSS for a while. However, the implementation cost of XSLT is indeed relatively high. Therefore, Resin has developed the XHTML-based lightweight template technology, and I think the implementation of ASP. net is similar.
There may be no best mode, but only the most appropriate mode: The key is to check the complexity of development.
Hundreds of lines of code may have the highest procedural programming efficiency;
Thousands of lines of code may be the most efficient for function development;
When there are tens of thousands of lines of code, it may have to be OO;