The text-align property
By default, the text inside table cells is aligned left or right, depending on the document's default language script. However, you can change horizontal alignment using the property text-align
within the style
attribute. Available values are left
, right
, and center
.
To align the cell's content vertically, use the vertical-align
property. Although the default alignment is middle
, you can change it to top
, bottom
, or other less common values.[1]