Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Bold a single line in html table <td> [closed]

Tags:

html

css

I have used the following code to make a table but in the tag i only need the XYZ to be bold and all others to be unbold. But when I used this code the whole is going bold. I don't wish to use a css style sheet with this file. Someone please tell me how I can achieve this.

<table width=100%>
<tr>
<td><center><b>XYZ<b><br>Aabc<br>+91-xxxxxxxxx<br>[email protected]<center></td>
</tr>
</table>

Thanks in advance.

like image 989
Harikrishnan Avatar asked May 30 '12 06:05

Harikrishnan


4 Answers

<table style='width:100%;'>
    <tr>
        <td style='text-align:center;'>
            <span style='font-weight:bold;'>XYZ</span><br>
            Aabc<br>
            +91-xxxxxxxxx<br>
            [email protected]</td>
    </tr>
 </table>

http://jsfiddle.net/n5WZt/

like image 114
Stefan Avatar answered Oct 21 '22 05:10

Stefan


  1. You should use a style sheet.
  2. There is a simple typo: The / is missing in the second occurrence of <b>.
like image 29
Oskar Berggren Avatar answered Oct 21 '22 04:10

Oskar Berggren


please close your all tag

<table width=100%>
<tr height=11%>
<td><center><b>XYZ</b><br>Aabc<br>+91-xxxxxxxxx<br>[email protected]</center></td>
</tr>
</table>
like image 43
CSS Guy Avatar answered Oct 21 '22 04:10

CSS Guy


You got wrong spelling in HTML tag, close b tag forgot /, try this:

<table width=100%>
  <tr>
    <td><center><b>XYZ</b><br>Aabc<br>+91-xxxxxxxxx<br>[email protected]<center></td>
  </tr>
</table>
like image 40
Someth Victory Avatar answered Oct 21 '22 04:10

Someth Victory