css|html Mark
In fact, CSS is also a powerful tool for separating HTML from data and performance. The CSS orienteddesign of the stone: Cod is very good to my taste, the rejection of Tod (Table oriented) is really not an easy thing to do, but once realized, The system itself has achieved the division of labor and collaboration: it can change the skin like Winamp, so as to play the user's greatest initiative. The most direct example is the MT system used on this website, all style is from Movablestyle.
Requirements: The <b> in the XML result set is displayed in red, which can be achieved through the CSS of the client:
The code is as follows:
First of all
<blockquote>
Use CSS instead of replace <b> tag </b>html tags via replace
</blockquote>
Use CSS instead of replace <b> tag </b>html tags via replace
Such
Defined in CSS: b {color:red;}
After all the <b> in addition to the bold, there are red attributes, in order to prevent the entire page of other <b> are marked red, I will put the results in a <
Blockquote>
, and then define in CSS:
<style><!--
blockquote b {color:red;}
-->
</style>
Because of the inheritance relationship of CSS, only all <b> in blockquote will be marked red:
You can even make <b> fonts thinner by setting Font-weight:normal.
Through this question: Draw 2 conclusions
1 when designing an external search service with indexing, you can use <b> as a marker
2 in the client, you can use CSS to achieve control.
About: CSS, Accesibility and standards Links
Postscript:
has also been a period of time very much to pursue the XML/XSLT/CSS data/structure/performance separation concept. But XSLT implementation costs are really high, so the lightweight template technology based on XHTML has been developed on resin, and I think it's kind of human. The implementation of ASP. NET is similar.
There may not be the best model, only the most appropriate pattern: the key or the complexity of the development itself
Hundreds of lines of code procedural programming efficiency may be the highest;
Thousands of lines of code may be the most efficient for function development;
Wan The amount of code, you may have to OO;