How to align the last line of a paragraph element to the right using CSS?
In this article, we will set the alignment of last paragraph element to the right by using CSS property. To set the alignment of last paragraph to right, we use CSS text-align-last property.
The text-align-last is used to set the last line of the paragraph just before the line break. The line break may be due to the natural ending of a paragraph, or it may be due to the use of <br> tag. The text-align-last property sets the alignment of all the last lines occurring in the element in which the text-align-last property is applied. For example, if the text-align-last property is applied to the <p> element then, all the last lines of the <p> element will be affected by the text-align-last property.
Supported Browsers: The browser supported by text-align-last property are listed below:
- Google Chrome 47.0
- Internet Explorer 5.5
- Firefox 49.0, 12.0 -moz-
- Opera 34.0