Solution 1 :

Use internal style with help of classes if support your PDF generation tool inside internal style.

<style type="text/css">
.my-table{border-collapse:separate;width:100%;}
.my-table td{font-family:Arial, sans-serif;font-size:14px;padding:10px 5px;border-style:solid;border-width:1px;overflow:hidden;word-break:normal;}
/*Below border color defined*/
.border-black{border-color: #000000;}
.border-green{border-color: #00ff00;}
.border-red{border-color: #ff0000;}
.border-blue{border-color: #0000ff;}
/*Below text color defined*/
.text-green{color: #00ff00;}
</style>

<table class="my-table" cellspacing="10" cellpadding="0">
  <tr>
    <td class="border-red" rowspan="2" width="80">
    	<img  height='100' width='80' src="http://cdn.pixabay.com/photo/2015/04/23/22/00/tree-736885_1280.jpg" alt=" Logo" />
    </td>
    <td class="border-black text-green">Some text with black border and green text color</td>
    <td class="border-blue" rowspan="2">
    	<label>Name: &nbsp;</label><br />
        <label>Class: &nbsp;</label><br />
        <label>ID: &nbsp;</label>
    </td>
  </tr>
  <tr>
    <td class="border-green text-green" width="400">
    	Some text with green border & green text color
    </td>
  </tr>
</table>

Problem :

I need to develop some example without using styles tags, i tried mostly, but i am unable to add border and border specific td borders please see my code and help me on this.

<table style="width:100%" border='0' cellpadding="0" ><tr cellspacing="0">
<td rowspan='2' > <img  height='100' width='80' src="http://cdn.pixabay.com/photo/2015/04/23/22/00/tree-736885_1280.jpg" alt=" Logo" /></td>
<td width='500' border='1' bordercolor="red"><b>some text</b></td></tr><tr cellspacing="0">
<td border='1' color='red' >some text
                  </td>
<td> <label> Name: &nbsp;</label><br />
                <label>class: &nbsp;</label><br />
                <label>  ID: &nbsp;</label></td></tr></table>

Output look like this:
Output look

Comments

Comment posted by Daniel

Can you use classes or IDs? Attributes like

Comment posted by Gonzalo

There’s a reason why you don’t use CSS file?

Comment posted by chaitanya

@Gonzalo yes, i am generating pdf using itextsharp, in that inline styles are not recognising, so need to develop like this only, i have option is loadstyles but it is effecting remaining pdf. So please help me on this output without style keyword (inline style)

Comment posted by chaitanya

@Daniel class is also fine. Will you please help me on this output

Comment posted by Raeesh Alam

If you can use classes then it will more simple with help of internal style and it will work when you generate PDF file or you want simple by html then use

By