Advantages of using “baseline” value for “valign” attribute in HTML

Asked By 20 points N/A Posted on -
qa-featured

In HTML we can use <td valign=”baseline”> or <tr valign=” baseline”>.

What are the advantages of using baseline value for “valign” attribute in HTML?

SHARE
Best Answer by Sharath Reddy
Answered By 0 points N/A #121257

Advantages of using “baseline” value for “valign” attribute in HTML

qa-featured

Good day !

There are three available values for vertical alignment (VALIGN) attribute in HTML.

The top, middle, bottom and baseline.

The top and middle don't need further explanation as it is very obvious.

The bottom value aligns the content of the cell along the bottom of the cell.

However, the baseline attribute aligns the content of the cell along the baseline (the imaginary line which the letters of a text, regardless of font size, sits. Refer to attachment. Notice the hook of the small letter g overlaps the imaginary baseline in the baseline attributed cell to align with other text content. That's the baseline alignment.

Best Answer
Best Answer
Answered By 565010 points N/A #121258

Advantages of using “baseline” value for “valign” attribute in HTML

qa-featured

In HTML tag, the “baseline” value you use in the “valign” element in <td> and <tr> tags acts as an imaginary line which the majority of the letters sit on in a row of text. The baseline value places the row so that all table data use the same baseline. The baseline value frequently has the same result as with the “bottom” value.

The only difference is that if the fonts used are in different sizes, the baseline value appears better than the bottom value. See image.

Though <td> and <tr> tags are still supported in HTML5, the “valign” attribute used in these tags are no longer supported in HTML5. Use CSS as an alternative. The “valign” attribute sets the vertical alignment of the cell content. The values you can use are: top, middle, bottom, and baseline.

Login/Register to Answer

Related Questions