Direction

Last updated

What is 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.

Free resources to learn Direction

More in stage 8: Text Styling

Direction: common questions

Can I learn Direction in Hindi?

This lesson is written in English. Once you sign in, open it in the interactive course and ask the AI tutor to explain Direction in Hindi or Hinglish. The tutor answers from this lesson’s own text, so it stays on the syllabus, and it runs on your own Google, OpenAI or Anthropic key.

Is this Direction tutorial for beginners?

It is lesson 26 of 104 in the free CSS roadmap, in stage 8, Text Styling. If you are new to CSS, start from stage 1 and come back here in order; if you already know the earlier stages, this lesson stands on its own.

Still confused? Ask me