HTML | DOM Style textAlignLast Property Last Updated : 05 Aug, 2022 Comments Improve Suggest changes Like Article Like Report The Style textAlignLast property in HTML DOM is used to set the alignment of the last line of the text. Syntax: Return the textAlignLast property: object.style.textAlignLast Set the textAlignLast property: object.style.textAlignLast = "auto | left | right | center | justify | start | end | initial | inherit" Property Values: Auto: The last line is justified and left aligned in the container. Left: The last line of the text is left aligned. Right: The last line of the text is right aligned. Center: The last line of the text is center-aligned. Justify: The last line is justified(last line occupies entire width of container by inserting extra spaces between the words). Start: The last line of the text is left aligned(if direction of text is left-to-right) and right aligned(if direction of text is right-to-left). End: The last line of the text is right aligned(if direction of text is left-to-right) and left aligned(if direction of text is right-to-left). Initial: Sets the last line to align by its initial value. Inherit: The last line inherits its property from parent element. Example 1: html <!DOCTYPE html> <html> <head> <title> HTML | DOM Style textAlignLast Property </title> <style> .right { text-align-last: right; border: 2px solid grey; } .center { text-align-last: center; border: 2px solid black; } </style> </head> <body> <h2 style="text-align:center"> Text-align-last-Right: </h2> <div class="right"> <!-- text-align-last: right; property --> <p> <font color="green"> GeeksForGeek A Computer Science Portal for Geeks </font> </p> </div> <h2 style="text-align:center"> Text-align-last-Center: </h2> <div class="center"> <!-- text-align-last: center; property --> <p> <font color="green"> GeeksForGeek A Computer Science Portal for Geeks </font> </p> </div> </body> </html> Output: Example 2: html <!DOCTYPE html> <html> <head> <title> HTML | DOM Style textAlignLast Property </title> <style> .justify { text-align-last: justify; border: 2px solid grey; } .start { text-align-last: start; border: 2px solid Green; } </style> </head> <body> <h2 style="text-align:center"> Text-align-last-Justify: </h2> <div class="justify"> <!-- text-align-last: justify; property --> <p> <font color="green"> GeeksForGeek A Computer Science Portal for Geeks </font> </p> </div> <h2 style="text-align:center"> Text-align-last-Start: </h2> <div class="start"> <!-- text-align-last: start; property --> <p> <font color="green"> GeeksForGeek A Computer Science Portal for Geeks </font> </p> </div> </body> </html> Output: Supported Browsers: The browser supported by HTML | DOM Style textAlignLast Property are listed be;ow: Google Chrome 47 Edge 12 Internet Explorer 5.5 Firefox 49.0 Opera 34 Safari 16 Comment More infoAdvertise with us C ChinkitManchanda Follow Improve Article Tags : Web Technologies HTML HTML-DOM HTML-Property Similar Reads HTML | DOM Input Password Object The Input Password Object in HTML DOM is used to represent an HTML input element with type="password". The input element with type="password" can be accessed by using getElementById() method. Syntax: It is used to access input type="password"document.getElementById("id");It is used to create type="p 3 min read HTML | DOM Column Object The Column Object in HTML DOM is used to represent the HTML <col> element. This tag is used to set or get the properties of <col> element. It can be accessed by using getElementById() method.Syntax: document.getElementById("Col_ID"); This Col_ID is assigned to HTML < col > element. 2 min read HTML | DOM Input Hidden Object The Input Hidden object in HTML DOM represents the <input> element with type = âhiddenâ attribute. The element can be accessed by using getElementById() method.Syntax: document.getElementById("id"); where id is assigned to the <input> tag.Property Values: defaultvalue: It is used to set 2 min read HTML | DOM Input Time Object The Input Time object in HTML DOM represents an <input> element with type = "time" attribute. The time attribute can be accessed by using getElementById() method. Syntax: document.getElementById("id"); where id is assigned to the <input> tag. Property Values: list: It returns the referen 3 min read HTML DOM Geolocation coordinates Property The DOM Geolocation coordinates Property in HTML is used to return the position and altitude of the device on Earth. The returned Coordinates object could be used for various purposes including navigation and tracking the position of the device. Property Values: ValuesDescriptioncoordinates.latitude 2 min read HTML DOM Textarea disabled Property The DOM Textarea disabled Property is used to set or return whether the textarea element would be disabled or not. A disabled text area is un-clickable and unusable. It is a boolean attribute and is used to reflect the HTML Disabled attribute. Syntax: It is used to return the disabled property.texta 2 min read HTML | DOM Input Week Object The Input Week object in HTML DOM represents an <input> element with type = "week" attribute. The element can be accessed by using getElementById() method. Syntax: document.getElementById("id"); where id is assigned to the <input> tag. Property Values: list: It returns the reference of d 3 min read HTML | DOM Style borderImageSource Property The DOM Style borderImageSource Property is used to set or return the image to be used instead of the styles given by the border-style property. Syntax: To get the borderImageSource propertyobject.style.borderImageSourceTo set the borderImageSource propertyobject.style.borderImageSource = "none | im 3 min read HTML | DOM Progress max Property The DOM Progress max Property is used to set or return the value of the max attribute of an <progress> element. The max attribute represents the total work is to be done for completing a task. Syntax: It is used to return the progress max property. progressObject.maxIt is used to set the progr 2 min read HTML | DOM Textarea autofocus Property The DOM Textarea autofocus Property is used to set or return whether the element should get focus when the page loads. This property is used to reflect the HTML autofocus attribute. Syntax: It is used to Return the autofocus property. textareaObject.autofocusIt is used to Set the autofocus property. 2 min read Like