Ascii code for less than or equal to

coolguy picture coolguy · Aug 27, 2012 · Viewed 74.6k times · Source

I cant find it on google.

What is the ASCII code for less than or equal to. I need this to be outputted in my browser

Answer

Nico Burns picture Nico Burns · Aug 27, 2012

The character isn't in the ASCII table. However, there are several ways to embed it in HTML.

Firstly, using HTML entities: either ≤, ≤, or &#x2264. Just place this code in your HTML where you want the symbol to be.

Alternatively, ensure that your html file is utf8 encoded, and include the meta tag <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> in the <head> of your document. You can then copy and paste the character directly into your document.