Bootstrap Add Text Align in Table Column– We can use bootstrap predefined classes to add the text align in table cell.
Bootstrap Add Text Align in Table Column Example
You can use following predefined classes for the alignment in table column-
- Text Align Center– Use Class text-center to align text center in table column.
- Text Align Left– Use Class text-left to align text center in table column.
- Text Align Right– Use Class text-right to align text center in table column.
Bootstrap Add Text Align in Table Column Example:
<title>Bootstrap Tutorial</title> <div class="container"> <table class="table"> <tr> <th class="text-left">Text left.</th> <th class="text-center">Text center.</th> <th class="text-right">Text right.</th> </tr> <tr> <td class="text-left">Text left.</td> <td class="text-center">Text center.</td> <td class="text-right">Text right.</td> </tr> </table> </div> |
If you run the above example it will produce output something like this-