Left Align Table Headings

To align content in table headings along the left side using CSS, set CSS text-align property for the table headings th, with the value left.

The CSS code to set text alignment for table headings to left is showing in the following.

th {
  text-align: left;
}

Examples

ADVERTISEMENT

1. Table headings left alignment

In the following example, we take a table with two columns, and three rows; and set the text alignment to left for the table headings.

index.html

Conclusion

In this CSS Tutorial, we learned how to use CSS text-align property to left align content in the table headings, with examples.