files/en-us/web/api/vttcue/positionalign/index.md
{{APIRef("WebVTT")}}
The positionAlign property of the {{domxref("VTTCue")}} interface is used to determine what {{domxref("VTTCue.position")}} is anchored to.
A string containing one of the following values:
"line-left"
"center"
"line-right"
"auto"
In the following example a new {{domxref("VTTCue")}} is created, then the value of positionAlign is set to "line-right". The value is then printed to the console.
let video = document.querySelector("video");
let track = video.addTextTrack("captions", "Captions", "en");
track.mode = "showing";
let cue = new VTTCue(0, 0.9, "Hildy!");
cue.positionAlign = "line-right";
console.log(cue.positionAlign);
track.addCue(cue);
{{Specifications}}
{{Compat}}