Convert Text to ASCII HTML Code


Page Title

Convert Text to ASCII HTML code

*Featured Code Created by Calvin

Edit box below to see results

Source Code:

        <title>Page Title</title>
          html, body {
    width: 100%;
    height: 96%;
    margin: 0;

          #inp, #out {
    width: 92%;
    height: 40%;
    margin-bottom: 10px;
    padding: 2%;
    margin: 2%;

#inp {
    border-radius: 5px;

#out {
    border: none;
    background-color: #ccffcc;

h1 {
    text-align: center;
    margin-bottom: 0px;
Convert Text to ASCII HTML code</h1>
<textarea id="inp">Sololearn - Join the largest community of mobile code learners today!</textarea>
        <textarea id="out"></textarea>
            onload = main;
var inp, out;

function main() {
    inp = document.getElementById("inp");
    out = document.getElementById("out");
    inp.addEventListener("keyup", charsToAsciiCode, false);
    function charsToAsciiCode() {
        text = inp.value;
        out.value = text.split('').map(function(c) {
            return '&#' + c.charCodeAt(0) + ';';

Click here to see and run this code via Sololearn

Try these Fun Games by Bobbie:

Ocean Treasures Game

Travel Blast Game New York

Play and Learn Russian

Battlestarship Game

Take a look at these Groovy Codes:

Fun IQ Test

Html Svg Starburst

Javascript Particles Fishes

Read the Latest Breaking Programming and Tech News, Great Articles and Tips:

Codenewz Programming and Tech News


Post a Comment

Popular posts from this blog

Multi-tap Keypad Text Entry

HTML5 Crossword 1