Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com
Answertopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 

Attribute for <TEXTAREA ...>
WRAP = SOFT | HARD | OFF

Usage Recommendation
use it, but don't rely on it

WRAP describes how the text in the text area should wrap at the end of lines. Until this attribute came along, browsers generally did not do word wrapping. If you typed a line that was longer than the display area, the line just kept going, hopefully with the display area scrolling along. This was not the way people are used to entering text, so Netscape added the WRAP attribute.

SOFT wraps long lines in the text area for easy editing, much like a word processor. It does not, however, send the carriage returns to the server. This type of wrap is probably the most useful because it is the easiest for the user to edit, but it does not actually change any of their data. HARD looks to the user like SOFT, but the carriage returns the user sees are sent to the server. OFF does not wrap at all; it displays and sends the text exactly as typed in.

this code produces this
<TEXTAREA NAME="SOFT" COLS=25 ROWS=5 WRAP=SOFT>
<TEXTAREA NAME="HARD" COLS=25 ROWS=5 WRAP=HARD>
<TEXTAREA NAME="OFF" COLS=25 ROWS=5 WRAP=OFF>
Default behaviour differs between browsers
<TEXTAREA NAME="NONE" COLS=25 ROWS=5>
 

You may from time to time see other variations on WRAP, such as VIRTUAL or PHYSICAL. Netscape introduced these attributes a few years ago as proposed extensions to HTML 3.0, then abandoned them. Officially, the HTML 4.0 specs don't list WRAP, but Netscape and MSIE list WRAP = HARD | SOFT | OFF in their guides. It's best to stick these three values.

 
 
  Copyright 1997-2002 Idocs inc. Published under the terms of the Open Content License Design by Interspire