title: What's the best way to simulate a DOS or Terminal screen in a web page?
body: <p>I'm finding this hard to even conceptualize. The easy way would be to have a large <code>textarea</code> element taking up most of the screen, with a small text <code>input</code> element below it. The player would type in commands, and the output would show up in the <code>textarea</code>.</p>
  
  <p>Problem is, I want the input to be integrated fully. Think of a DOS screen. There is the bracket prompt, <code>&gt;</code>, after which you type in a command. Press Enter and the output is shown below it, followed by another <code>&gt;</code> prompt for the next command. Input is not separate, visually, from output. An example of what I'd like to accomplish can be seen here: <a href="http://www.youtube.com/watch?v=UC_FrikiZdE" rel="noreferrer">http://www.youtube.com/watch?v=UC_FrikiZdE</a> (except instead of using the mouse to choose commands, they can be entered in).</p>
  
  <p>How would I go about doing that in HTML (using JavaScript/jQuery for handling input/output)? I'm thinking perhaps everything is done in an editable <code>textarea</code>, but the Backspace button cannot erase anything from the <code>&gt;</code> prompt and beyond, only text that has been entered in.</p>
  
  <p>What is the easiest way to do this? I haven't been able to find any demonstrations or tutorials online. Can anybody point me to any that I may have missed? Thanks.</p>