Skip to content Skip to sidebar Skip to footer

Where Can I Find A List Of All Special HTML Characters?

I'm in the process of adding various physics equations to a website. There are several special characters I've needed to add, and I haven't been able to find some of them (for ins

Solution 1:

With just a bit of Javascript you can build your own:

Unicode UTF-8 characters generator

function el(id) {return document.getElementById(id); }

var from = 8000; // Start from 
var show = 1000; // How many to show
var cont = el("container");
var prev = el("prev");
var next = el("next");
var curr = el("curr"); 


function prevNext(){
  from = this.id === "next" ? from+=show : from-=show;
  if(from>=0)createUnicodeChars();
  else from=0;
}

function createUnicodeChars() {
  var spans = "";
  for(var i=from; i<from+show; i++){
    var uc = i.toString(16);
    spans += "<span>&#"+i+";<br><small>&amp;#"+i+";<br>\\"+uc+"</small></span>";
  }

  curr.innerHTML = from +' - '+ (from+show);
  cont.innerHTML = spans;
}

prev.onclick = prevNext;
next.onclick = prevNext;

createUnicodeChars(); // First run!
body{background:#eee;}
span{
  position:relative;
  display:inline-block;
  width: 80px;
  padding:10px;
  height:80px;
  margin:3px;
  font-size:2em;
  text-align:center;
  vertical-align:top;
  background:#fff;
  border:1px solid #aaa;
  border-radius:5px;
  box-shadow: 0 2px 3px rgba(0,0,0,0.1);
}
span small{
  position:absolute;
  width:80%;
  bottom:5px;
  text-align:ccenter;
  display:block;
  font-size:12px;
  line-height:14px;
}
#container{
  margin-top:50px;
  text-align:center;
}
#controls{
  background:#fff;
  box-shadow: 0 0 20px #000;
  position:fixed;
  z-index:1;
  top:0;
  left:0;
  padding:10px;
  width:100%;
  text-align:center;
}
<div id="controls">
      <button id="prev">PREV</button>
      <b id="curr"></b>
      <button id="next">NEXT</button>
</div>
<div id="container"></div>

Will give you the Character representation,
the numerical HTML encoding &#num; of the Unicode character,
the UTF-8 Hex. code \hex (you can use in CSS :after or :before content: jsBin)


Solution 2:

How about this, from the w3 org:

http://dev.w3.org/html5/html-author/charref


Post a Comment for "Where Can I Find A List Of All Special HTML Characters?"