HTML and CSS Reference
In-Depth Information
Replace b with strong or CSS
Change all b elements into strong elements or span elements.
I'm <b>very</b> certain of this.
The triangle inequality states that
||<b>x</b> + <b>y</b>|| ||<b>x</b>|| + ||<b>y</b>||
I'm <strong>very</strong> certain of this.
The triangle inequality states that
||<span class='vector'>x</span>
+ <span class='vector'>y</span>||
||<span class='vector'>x</span>||
+ ||<span class='vector'>y</span>||
The b element is not allowed in XHTML strict. It describes appearance, not meaning, and it does not work in
non-GUI browsers such as Lynx or screen readers. It should be replaced by more descriptive semantic markup.
Usually that's a strong element, but on occasion it's something else.
Potential Trade-offs
Very old browsers may not recognize the CSS rules. However, even the first and buggiest third-generation
browsers that supported CSS at all supported this much. All browsers back to Mosaic 1.0 support the strong
Simple validation with the strict DTD will locate all the b elements. Alternatively, a quick search for </b> will find
them all.
If you're willing to assert that the only reason you ever used the b element was to emphasize something, you
can just replace these with strong tags.
However, many sites use the b element as a fairly presentational effect, without meaning a whole lot. If this is
the case, replace it with CSS. For example, change this:
<a href="72.html"><b>Next Page</b></a>
into this:
<a style="font-weight: bold" href="72.html">Next page</a>
You may wish to use a class or id attribute so that you can place the style information in an external
stylesheet instead:
Search WWH ::

Custom Search