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

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

2 answers

0
points

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 over 6 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 over 6 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 over 6 years ago
0
points

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 over 6 years ago by Mike Combs