How can I view Arabic/Persian numbers in a HTML page with strict doctype?

后端 未结 10 1881
时光说笑
时光说笑 2020-12-18 19:26

I have an HTML page that is right-to-left. When I don\'t use any doctype, my numbers are in Arabic/Persian, but when I use strict mode they turn to English.

         


        
10条回答
  •  一整个雨季
    2020-12-18 20:06

    It is very simple to view Arabic/Persian numbers in a HTML page.

    I solved the same problem by changing the font name,

    In my case I want to display the same character to all users

    you can choose a font that contains Arabic-Hndi digits and import it using the css ( @font-face ) then simply use it,

    This works fine for all major browsers (IE .. Firefox .. Chrome)

    look at this result

    here is the full code of the page:

    
    
    
    
    
    
    
    
    
    
    هذا نص هندي 123456

提交回复
热议问题