I am creating a form for my website and so far have been able to make the message box larger. But for some reason, text which is inputted into the box stays on one line in the centre of the box.
I want to make the box like the "Your Message" box on this web page:
My code at the moment:
<p> <label for="from">Your message:</label> <br /> <input type="text" name="message" value="type your message..." onclick="this.value=''"/> </p> 3 Answers
You need to use tag as follows.
<p> <label for="from">Your message:</label> <br /> <textarea name="message" onclick="this.value=''">Enter text here...</textarea> </p> I hope this is what you are looking for.
Regards.
You should use <textarea></textarea> instead of <input/>
Use the <textarea> tag which allows users to type in their own messages.
Try this code:
<textarea rows='8' cols='50'>Your message:</textarea>
<textarea> tags are also resizable.