Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How we can bold only the name in table td tag not the value

Is there any way that I can make CC Quid, Application Number, Application Title and in the same way other thing in bold, I don't want their value to be in bold. Any suggestions will be appreciated..

html = html + "<table border ='0'>";
    html= html + "<tr>";
    html =html + "<td>CC Quid: " +(data.response.docs[0].c_cc_guid)+"</td></tr>";
    html =html + "<tr><td>Application Number: " +(data.response.docs[0].c_application_number)+"</td></tr>";
    html =html + "<tr><td>Application Title: " +(data.response.docs[0].c_application_title)+"</td></tr>";
    html =html + "<tr><td>Application Type Name: " +(data.response.docs[0].c_application_type_name)+"</td></tr>";
    html =html + "<tr><td>Case Mgr Name: " +(data.response.docs[0].c_case_mgr_name)+"</td></tr>";
    html =html + "<tr><td>Filed Date: " +(data.response.docs[0].c_filed_date)+"</td></tr>";
    html =html + "<tr><td>Lead Atny Name: " +(data.response.docs[0].c_lead_atny_name)+"</td></tr>";
    html =html + "</table>";
like image 539
arsenal Avatar asked Jun 16 '11 23:06

arsenal


People also ask

How do I make text bold in TD tag?

The HTML <b> element defines bold text, without any extra importance.

How do I bold a label in HTML?

To bold the text in HTML, use either the strong tag or the b (bold) tag. Browsers will bold the text inside both of these tags the same, but the strong tag indicates that the text is of particular importance or urgency. You can also bold text with the CSS font-weight property set to “bold.”

How do you make your text bold?

Type the keyboard shortcut: CTRL+B.

How do I make my table header bold?

The HTML <th> tag defines a header cell that can appear in the first row of an HTML table. Browsers traditionally render the text found within the <th> tag as bold, center-aligned text. This tag is also commonly referred to as the <th> element.


2 Answers

Surround what you want to be bold with:

<span style="font-weight:bold">Your bold text</span>

This would go inside your <td> tag.

like image 57
Ord Avatar answered Sep 21 '22 14:09

Ord


Wrap the name in a span, give it a class and assign a style to that class:

<td><span class="names">Name text you want bold</span> rest of your text</td>

style:

.names { font-weight: bold; }
like image 34
kinakuta Avatar answered Sep 21 '22 14:09

kinakuta