CSS | text-orientation Property
The text-orientation property in CSS is used to set the orientation of the character in a line. This property is useful in vertical scriptings, like creating vertical table headers, defining the row’s names, etc.
Syntax:
text-orientation: mixed|upright|sideways;
Attribute:
- mixed: This value is used to rotate the character of text into 90 degree clockwise. It is the default value.
Example:
<!DOCTYPE html><head><title>CSS | text-orientation Property</title><style>h1 {color:green;}p {writing-mode: vertical-rl;text-orientation: mixed;}</style></head><body><h1>GeeksforGeeks</h1><p>A Computer Science Portal</p></body></html>chevron_rightfilter_noneOutput:

- upright: This value start the text from right side of the screen to the downside.
Example:<!DOCTYPE html><head><title>CSS | text-orientation Property</title><style>h1 {color:green;}p {writing-mode: vertical-rl;text-orientation: upright;}</style></head><body><h1>GeeksforGeeks</h1><p>A Computer Science Portal</p></body></html>chevron_rightfilter_noneOutput:

- sideways: This value rotates the text line into 90 degree clockwise.
Example:
<!DOCTYPE html><head><title>CSS | text-orientation Property</title><style>h1 {color:green;}p {writing-mode: vertical-rl;text-orientation: sideways;}</style></head><body><h1>GeeksforGeeks</h1><p>A Computer Science Portal</p></body></html>chevron_rightfilter_noneOutput:

Note: The text-orientation property is depends on writing-mode property, if it not sets on horizontal-tb then this property will work.
Supported Browsers: The browsers supported by text-orientation Property are listed below:
- Google Chrome
- Firefox
- Opera
- CSS | transition-property Property
- CSS | nav-down property
- CSS | all Property
- CSS | right Property
- CSS | nav-right property
- CSS | nav-up property
- CSS | top Property
- CSS | clip Property
- Web API | DOMRectReadOnly y property
- HTML | DOM li value Property
- CSS | cursor property
- CSS | align-self Property
- CSS | perspective Property
- CSS | resize Property
- CSS overflow-y Property
Recommended Posts:
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.
Improved By : nidhi_biet


