HTML creating a text box for a form

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.as shown here

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.

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like