IVCatalina
IVCatalina

Reputation: 356

PRE code showing as text

I am using the pre code to show my code as text on an actual page, inside a textbox (kind of like we do here). It is working except it shows the actual word <pre> as part of the code. How do I remove this?

Example:

<form>
<textarea name="myTextBox" cols="100" rows="10">

<pre>
<!-- Add this into your Header -->

<style>
body .calculator_external{font-family:"Titillium",Arial,sans-serif;font-weight:300}.calculator_external p{margin:0px;padding:0px;border:0px none;font:inherit;vertical-align:baseline;line-height:1.6em;color:#666}
</style>
</pre>
</textarea>
</form>

For example, if I remove the PRE text, it does this:

<br />
<!-- Add this into your Header --></p>
<style>

Upvotes: 0

Views: 120

Answers (2)

AsgarAli
AsgarAli

Reputation: 2211

<style>
    body .calculator_external
    {
        font-family: "Titillium", Arial, sans-serif;
        font-weight: 300
    }
    .calculator_external p
    {
        margin: 0px;
        padding: 0px;
        border: 0px none;
        font: inherit;
        vertical-align: baseline;
        line-height: 1.6em;
        color: #666
    }
</style>
<form>
    <textarea name="myTextBox" cols="100" rows="10"></textarea>
</form>

Upvotes: 0

AsgarAli
AsgarAli

Reputation: 2211

Value of Textarea and Textbox do not convert html tag to its appropriate outpout. It will accept html tag as normal string.

Upvotes: 1

Related Questions