Which of the following property is used to align the text in a table?

align
text
text-align
none of the mentioned

The correct answer is: A. align

The align property is used to align the text in a table. It can be used to align the text in the cells of a table, or to align the table itself within a page.

The text property is used to specify the font, size, and color of text. It cannot be used to align text.

The text-align property is used to align text within a block element, such as a paragraph. It cannot be used to align text in a table.

Here is an example of how to use the align property to align the text in a table:

“`html

This is some text This is some more text
This is even more text This is the last bit of text

“`

In this example, the text in the first column of the table is centered, the text in the second column is right-aligned, and the text in the third column is left-aligned.

Exit mobile version