prevents backspace default, scores your typing, moves cursor, and generates html of inputted text