If you want to have boxes only around some text within larger HTML container (td, div), use following code:
<span style="display:inline-block;border:1px solid #000;">
Your text goes here...
</span>
If you apply code to text within <td> element of a table, you'll get result like this: