Why is that the numbers generated by ol not in the specified language, hindi ?

<!DOCTYPE html>
<html lang="hi">
<meta charset="utf-8" />
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />

2 answers


I'm not entirely sure of the browser support, but I think you need to set this in your CSS, e.g.

html[lang=hi] ol {
    list-style-type: decimal;

I'm fairly sure that's the wrong list-style-type, but it should point you in the right direction. W3Schools has more on the subject.

Answered almost 8 years ago by Olly Hodgson
  • I was expecting the decimal numerals to be in hindi language since I had given the lang attribute in html. Motion Grafika almost 8 years ago
  • I believe the lang attribute just informs the browser what language the content is in. I don't think it does anything to inform the styling. I could be wrong on this though. Olly Hodgson almost 8 years ago

As Hodgson (above) says, the language attribute tells the browser what language the content is in. The browser generates the numbers on an ordered list, so it may be that your browser is not switching to or doesn't support Hindi. I'd double-check your browser's language settings.

This should work without CSS.

Answered almost 8 years ago by Mike Combs