text-orientation: upright और writing-mode: vertical-rl निर्दिष्ट करके, हम CSS के साथ हॉरिजॉन्टल लेटर्स के साथ वर्टिकल टेक्स्ट प्रदर्शित कर सकते हैं।
सिंटैक्स
CSS writing-mode और text-orientation प्रॉपर्टी का सिंटैक्स निम्नानुसार है:
Selector { writing-mode: /*value*/ text-orientation: /*value*/ }
उदाहरण 1
निम्न उदाहरण CSS outline-offset प्रॉपर्टी को दर्शाते हैं।
<!DOCTYPE html> <html> <head> <style> h4 { text-orientation: upright; writing-mode: vertical-rl; line-height: 3; box-shadow: inset 0 0 3px khaki; } </style> </head> <body> <h4>Sed nec tortor</h4> </body> </html>
इससे निम्न आउटपुट मिलता है:

उदाहरण 2
<!DOCTYPE html> <html> <head> <style> body { display: flex; flex: 1; } p { text-orientation: upright; writing-mode: vertical-rl; line-height: 3; box-shadow: inset 0 0 13px orange; } </style> </head> <body> <p>One</p> <p>Two</p> <p>Three</p> <p>Four</p> </body> </html>
इससे निम्न आउटपुट मिलता है:
