HTML code for INR
For pound (£) there is HTML code £
.
For INR can you please tell me the HTML code?开发者_开发百科
You can use the following HTML snippet:
<p>Price ₹ 9500 = ₹ 9500</p>
<p>Price ₹ 5500 = ₹ 5500</p>
<p>Price ₨ 500 = ₨ 500</p>
<p>Price ₨ 2000 = ₨ 2000</p>
₹ Indian rupee sign. HTML: ₹
— ₹ or ₹
— also ₹, corresponding to Unicode U+20B9.
Please try this -
INR (₹) sign HTML Code - ₹
The indian rupee sign is pretty new (introduced this July if I read it correctly) and doesn't even have a Unicode position yet, much less a HTML entity.
Even when it gets a Unicode position, it will probably still take years until it can be reliably used on a web page, because the client computers' Fonts will need to be updated accordingly. (I could imagine a font-face
workaround with a custom font, though.)
Wikipedia uses an image file to display the symbol. It's far from good, but it may be the best workaround at the moment.
The generic rupee sign has three Unicode characters. See here.
No! You should avoid using HTML entities.
Instead of using HTML entities for symbols you should just put those symbols directly into your text and correctly encode your document.
- Instead of using
£
you should use the character£
. - For rupee there is no Unicode character. You can use a PNG file instead . Alternatively you can use the unicode character
रू
which is currently the most commonly used single character for rupee. Other alternatives are usingINR
,Rs.
orrupees
.
When the new Unicode symbol for the Indian Rupee is introduced then could use that instead (but note that it will be a while before all browsers support it).
Use this for Indian rupee sign:
र
— र
How about using fontawesome icon for Indian Rupee (INR).
Add font awesome CSS from CDN in the Head section of your HTML page:
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
And then using the font like this:
<i class="fa fa-inr" aria-hidden="true"></i>
Here is one more example based on Intl.NumberFormat native api.
var number = 123456.789;
// India uses thousands/lakh/crore separators
console.log(new Intl.NumberFormat('en-IN', {
style: 'currency',
currency: 'INR',
// limit to six significant digits (Possible values are from 1 to 21).
maximumSignificantDigits: 6
}).format(number));
According to Wikipedia, the new rupee sign hasn't been added to Unicode yet (U+20B9 ₹ was added to Unicode in late 2010), so you can't use it from HTML. The old (unofficial) symbol is ₨ — ₨.
just add ₹ with semicolon where ever you want to display the rupee sign it worked for me
Use similar symbol: <del>र</del>
=> र
Try ₹
=> ₹
Use an image(bad solution but works): <img src="http://i.stack.imgur.com/nGbfO.png" width="8" height="10">
=>
Source: Empty rectanglar box is displayed instead of the rupee symbol in HTML
you can use र => र ,but this is not professional way.
I recommend that you should use fontawesome
SPAN class code. Stylesheet:
<link rel="stylesheet" type="text/css" href="http://cdn.webrupee.com/font">
Now use the below mentioned code to type Indian Rupee symbol,
<span class="WebRupee">Rs.</span>
Once the popular font families will be updated to Unicode 6.0.0, then you will be able to type Indian Rupee Symbol by typing ₹ in HTML editor.
精彩评论