title: Make contents of a table or td tag bold
body: <p>I'm working with some legacy code and encountered the following issue.</p>
  
  <p>I'm using YAHOO.widget.DataTable( elContainer, aColumnDefs, oDataSource, oConfigs ) structure to modify html elements in a table.</p>
  
  <p>I am running a basic number to US currency conversion on the code in one td of this table. It works for other tables however it fails in this table because all elements are set to bold via the "&lt; \b >" tag which is being pulled into the Yahoo Table structure as the td value.</p>
  
  <p>Ex:</p>
  
  <pre><code>&lt;td&gt;
      &lt;b&gt;&lt;s:property value="totalTransactions"/&gt; my text &lt;/b&gt;
  &lt;/td&gt;
  </code></pre>
  
  <p>For example when the table queries the value at this td it gets 
  <code>"&lt;b&gt;&lt;s:property value="totalTransactions"/&gt; my text&lt;/b&gt;".</code> When really all I want is <em>my text</em>. </p>
  
  <p>My preffered solution is to remove the b tags. 
      
          
      </p>
  
  <p>So the code can run (and doesn't need to differ between different tables and it doesn't need to clean them all first and then attempt to distinguish when it should add bold tags back)</p>
  
  <p>For example I could check if html exists remove it, modify the number, and then add the html back. I think it's cleaner (personal preference perhaps) to modify the table so that it keeps the bold font for all elements in it without adding text inside the td tag.</p>
  
  <p>I looked at: <a href="https://stackoverflow.com/questions/10811351/bold-a-single-line-in-html-table-td">Bold a single line in html table &lt;td&gt;</a></p>
  
  <p>I tried </p>
  
  <pre><code>&lt;td style="font-weight:bold"&gt; my text &lt;/td&gt;
  </code></pre>
  
  <p>However it does not become bold. </p>
  
  <p>the bold tag makes the text bold when done like this:</p>
  
  <pre><code>&lt;td&gt;
      &lt;b&gt;my text&lt;/b&gt;
  &lt;/td&gt;
  </code></pre>
  
  <p>However the b tag interferes with my function. My thought that is due to the yahoo injection:</p>
  
  <pre><code>result =  "$"+myAmount;
  el.innerHTML = result;  
  </code></pre>
  
  <p>That the bold style might be overwritten. Are there any solutions? Or is there another reason style doesn't work?</p>
  
  <p>I believe the issue is due to the fact that I'm using a struct: see <a href="http://www.mkyong.com/struts2/struts-2-property-tag-example/" rel="nofollow noreferrer">http://www.mkyong.com/struts2/struts-2-property-tag-example/</a> .</p>
  
  <p>I am unsure of why traditional styling rules do not apply. Or perhaps I have made an error? The page renders fine just without any bold. I see no logged errors. </p>