Syntax of vertial-align attribute

Frontend 2021-08-21 14:49:56 0 3,089

In the web text editor, there are many ways to align the text in the centre of a line called centre alignment, the title of the article and the data in the table are generally centered. Sometimes there is a requirement to align text vertically, i.e. to align the top or bottom of the text.

In CSS, this can be defined directly using the vertical-align property, which is used to set the vertical alignment. This attribute defines the vertical alignment of the baseline of an in-line element relative to the baseline of the line in which the element is located. Negative length values and percentage values are allowed to be specified. This will cause the element to be lowered rather than raised. In a table, this attribute can be used to set the alignment of the contents of a cell.

The syntax of the vertical-align attribute is formatted as shown below.

vertical- align:baseline l sub l super l top l text-top l bottom l text-bottom l length l % l inherit.

Translated with www.DeepL.com/Translator (free version)

#vertial-align#


Your opinion

Already have 0 Article answer