RTL
Support for right-to-left text in Bootstrap across our layout, components, and utilities.
Contents
In this learn how to enable support for right-to-left text in Bootstrap across our layout, components, and utilities.
Enable RTL
There are two strict requirements for enabling RTL in Bootstrap-powered pages.
- Set
dir="rtl"
on the<html>
element. - Add an appropriate lang attribute, like
lang="ar"
, on the<html>
element.
Here is an example of a starter HTML template that implements the above requirements:
<!doctype html>
<html lang="ar" dir="rtl">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- FastBootstrap CSS -->
<link rel="stylesheet" href="css/fast-bootstrap.rtl.min.css" />
<title>مرحبًا بالعالم!</title>
</head>
<body>
<h1>مرحبًا بالعالم!</h1>
<!-- FastBootstrap JS -->
<script src="js/fast-bootstrap.bundle.min.js"></script>
</body>
</html>