0

I was looking around GMail and just found that the Message Composition uses:

  • textarea for recipients
  • input for subject
  • div for the message

I want to focus on the div for the message part. So I did some research and found out to be able to make a div behave like a textarea simply do this.

But my question is. Why do it? Why not just use an ordinary textarea? Does it provide any additional security?

Community
  • 1
  • 1
Jo E.
  • 7,822
  • 14
  • 58
  • 94

1 Answers1

2

Because they cover it with JavaScript to make it a ~WYSIWYG control instead of a plain text one.

Quentin
  • 914,110
  • 126
  • 1,211
  • 1,335