VOOZH about

URL: https://www.geeksforgeeks.org/css/css-dir-selector/

⇱ CSS :dir Selector - GeeksforGeeks


  • Courses
  • Tutorials
  • Interview Prep

CSS :dir Selector

Last Updated : 22 Aug, 2022

:dir is used to select and change the properties of the text element having direction left to right or right to left.

Syntax:

:dir(ltr|rtl)

Parameters: It accepts the following two parameters.

  • ltr: This keyword basically looks for elements having direction from left to right.
  • rtl: This keyword basically looks for elements having direction from right to left.

Note: Please run the code in Firefox browser.

Example:

Output:

👁 Image

Example 2:

Output:

👁 Image

Supported Browsers:

  • Firefox 49.0
Comment
Article Tags: