textfield color html code

  • Thread starter Alexandre Jaquet
  • Start date
A

Alexandre Jaquet

Hi,

I wonder if anyone could suggest me a way to highligth html tag in a
<textfield> box

thx in advance
 
E

Els

Alexandre said:
Hi,
Hello,

I wonder if anyone could suggest me a way to highligth html tag in a
<textfield> box

What is a <textfield> box, and how is an html tag inside of it?
Can you give an example of what you want?
 
A

Alexandre Jaquet

Els a écrit :
Alexandre Jaquet wrote:




What is a <textfield> box, and how is an html tag inside of it?
Can you give an example of what you want?
a textarea field, I want to display a page code in an textarea and color
html tag
 
O

Oli Filth

Alexandre said:
Els a écrit :

a textarea field, I want to display a page code in an textarea and color
html tag

If you just want to display some code, then you don't need to use a
<textarea>.

However, if you want the user to be able to edit the code, then
obviously you do need a <textarea>. However, I don't think a <textarea>
is a rich-edit control, i.e. you can't apply different styles to
different sections of its content.
 
A

Adrienne

Els a écrit :
a textarea field, I want to display a page code in an textarea and color
html tag

You can't place styling inside the textarea element because anything
between <textarea> and </textarea> is a value. The only thing you can do
is style the element itself, eg: <textarea style="background-color: yellow;
color: red" rows="10" cols="20">This is red text on a yellow background
</textarea>. Of course, using the style element in the head, or better
yet, an external stylesheet is preferred.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,537
Members
45,020
Latest member
GenesisGai

Latest Threads

Top