Rules for Styling Tables in Software, Website, or Mobile App

May 15, 2025

Follow these UI/UX guidelines to design clean, user-friendly, and responsive tables in any interface using Bootstrap

1. Column Alignment: Left, Center, or Right?

Choose alignment based on the content type:

  • Left: Text, names, IDs
  • Center: Icons, statuses, buttons
  • Right: Numbers, amounts, dates
<td class="text-start">John Doe</td>
<td class="text-center"><i class="bi bi-check-circle text-success"></i></td>
<td class="text-end">$123.45</td>

2. Making Tables Responsive

Use .table-responsive to handle overflow on smaller screens.

Name Status Amount
Jane Smith Active $2,345.67

3. Which Columns Should Be Sortable?

Only enable sorting where it improves usability:

  • Sortable: Names, dates, numeric fields
  • Not Sortable: Action buttons, icons, multiline text
<th>
  Name <i class="bi bi-arrow-down-up text-muted"></i>
</th>

4. How to Link a Record

Link specific cells or whole rows to detail views:

Option 1: Link in cell

<td>
  <a href="/users/123" class="text-decoration-none">John Doe</a>
</td>

Option 2: Clickable row

<tr onclick="window.location='/users/123'" style="cursor:pointer;">
  <td>John Doe</td>
  <td class="text-center">Admin</td>
  <td class="text-end">$1,200</td>
</tr>

5. Full Example Table

Name Status Amount Actions
Jane Smith Active $2,345.67 Edit

6. Summary Table

Content Type Alignment Sortable Notes
Text (Name, Address) Left Use for key identifiers
Numbers (Price, Qty) Right Align decimals for scanning
Status, Icons Center Balanced look
Action Buttons Center Avoid sorting interaction cells
Long Descriptions Left Consider truncation or modals

Why Table Styling Matters in Software, Web, and Mobile Development

Well-styled tables are critical for usability, clarity, and performance. Whether you're building enterprise software, a custom web app, a mobile-first interface, or a mobile app, tables often present the most important data users interact with-think transactions, users, metrics, or reports. Poorly designed tables can overwhelm users, cause frustration, or even lead to incorrect decisions. By applying consistent styling rules-such as proper alignment, responsive behavior, and clear interactions-you ensure that your data is not only readable but also actionable across all devices and screen sizes. Good styling turns raw data into an intuitive experience.