Home / Learn HTML / HTML Languages and Directions
HTML Languages and Directions
Build pages for Hindi, Arabic, Japanese and more. Language and direction attributes do the work.
lang on the page, dir="rtl" for right to left scripts, and use UTF-8.Definition
Internationalization prepares a page for many languages and writing directions. Use the lang attribute, UTF-8, the dir attribute for right to left languages and hreflang links to connect the translated versions.
Theory in plain words
What it is
Internationalisation makes a page work for many languages and writing directions.
Why we use it
It lets Hindi, Arabic or Japanese readers use your page correctly.
How it works
The lang attribute names the language, dir sets left to right or right to left, and UTF-8 stores every letter.
Where it is used
- Multi language sites
- Arabic and Hebrew pages (rtl)
- Translation tools and screen readers
Even the list bullets move to the right side.
Quick quiz
1. Which attribute sets the language?
<html lang="hi">.
2. Right to left text uses
dir sets direction.
3. Charset for all languages
UTF-8 covers them all.