Repository navigation
Expand file tree
/
Copy pathindex.md
More file actions
48 lines (34 loc) · 1.63 KB
/
Copy pathindex.md
File metadata and controls
48 lines (34 loc) · 1.63 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
---
title: "HTMLTableRowElement: vAlign property"
short-title: vAlign
slug: Web/API/HTMLTableRowElement/vAlign
page-type: web-api-instance-property
status:
- deprecated
browser-compat: api.HTMLTableRowElement.vAlign
---
{{APIRef("HTML DOM")}}
The **`vAlign`** property of the {{domxref("HTMLTableRowElement")}} interface is a string indicating how to vertically align text in a {{htmlelement("tr")}} table row. Individual cells can override it.
> [!NOTE]
> This property is deprecated. Use the CSS {{cssxref("vertical-align")}} property to horizontally align text in a row instead.
## Value
The possible values are: `"top"`, `"middle"`, `"bottom"`, or `"baseline"`
- `top`
- : Align the text to the top of the cell. Use `vertical-align: top` instead.
- `center`
- : Vertically center the text in the cell. Synonym of `middle`. Use `vertical-align: middle` instead.
- `middle`
- : Vertically center the text in the cell. Use `vertical-align: middle` instead.
- `bottom`
- : Align the text to the bottom of the cell. Use `vertical-align: bottom` instead.
- `baseline`
- : Similar to `top`, but align the baseline of the text as close to the top so no part of the character is outside of the cell.
## Examples
Use CSS {{cssxref("vertical-align")}} instead, which takes precedence, as demonstrated in the [vertical alignment table cells](/en-US/docs/Web/CSS/Reference/Properties/vertical-align#vertical_alignment_in_a_table_cell) example.
## Specifications
{{Specifications}}
## Browser compatibility
{{Compat}}
## See also
- {{cssxref("vertical-align")}}
- [Learn: Styling tables](/en-US/docs/Learn_web_development/Core/Styling_basics/Tables)