Whats the code for a scrolling text box with no html?

I want to have a text box to where I can put html codes inside, and people be able to copy the code.

Does anyone know a code for this?

4 Answers

Relevance
  • 1 decade ago
    Favorite Answer

    A textarea on its own won't allow you to click and copy to clipboard like this:

    <textarea id=html onclick="highlight(this)"> HTML here </textarea>

    <script language=Javascript>

    function highlight(text) {

    text.focus();

    text.select();

    }

    </script>

    • Login to reply the answers
  • 4 years ago

    You probably mean a 'textarea'. And what you want to do is called 'escaping'. If you are using PHP, you can call <?php echo htmlspecialchars($data); ?> inside the textarea tags. If not, then you get to have fun with Javascript to do string replacements.

    • Login to reply the answers
  • 1 decade ago

    <textarea>Html codes here</textarea>

    • Login to reply the answers
  • Anonymous
    1 decade ago

    <MARQUEEE> TEXT </MARQUEE>

    • Login to reply the answers
Still have questions? Get your answers by asking now.