Back to Developer Roadmap

Direction

src/data/roadmaps/css/content/[email protected]

4.0955 B
Original Source

Direction

The direction property in CSS sets the text direction of block-level elements, influencing how text, table columns, and inline-level boxes flow. While direction can be used to switch between left-to-right (LTR) and right-to-left (RTL) layouts, it's generally better to use the HTML dir global attribute. The dir attribute semantically indicates the document's or element's text direction, providing better accessibility and separation of concerns compared to styling direction with CSS.

Visit the following resources to learn more: