Word wrap is a feature which allows text to be carried over to the next line so that it will stay within a set of defined margins. Most word processors have this feature, so that people are not forced to enter a return at the end of every line, and there are a variety of ways to play with word wrap within documents. Coding used to build websites can also integrate a word wrap feature, allowing the designer more control over the presentation of the site.
Most word processors have line wrap, which automatically brings text down to the next line when it hits the end of the margin. In the process, the document creates what is known as a “soft return.” If the margins are adjusted, the text will re-wrap the lines, ignoring the soft returns created by the line wrap function while preserving the hard returns entered by the user. Word processors utilize word wrapping algorithms so that long lines of text don't force the user to scroll sideways to read more.
In a word processor, word wrap creates line breaks between words, with the goal of avoiding excessive hyphenation, unless the user specifies otherwise. The word wrap will also break up a long word with no spaces to maintain typographic integrity. In other words, if a word is so long that it would spill over a complete line, the word processor will add a hyphen to break up the word so that the text will display within the margins set by the user.
People can force word wrap on and off with many word processors and graphic design programs to achieve specific looks. Sometimes, for example, users want total control over line breaks, in which case they may turn the function off so that they can dictate the points at which lines end and begin. In other cases, users may leave the line breaks up to the computer, specifying whether or not they want hyphens if words happen to appear near the end of a line. Hyphenation can help to create a crisp, justified margin, while lack of hyphenation usually causes ragged margins, although users can also play with the spacing within lines to even out the margins without hyphenating.
In web coding, word wrap can be extremely important, both as a way of controlling appearance, and to keep text confined to specific areas. Many browsers support both word wrapping, which maintains particular margins, and break-word, in which long words without spaces will be forcibly broken to maintain the look of the text. Unfortunately, as people view text in different browsers and on different platforms, the break-word function can sometimes cause the typography to look strange. People may have noticed a breakdown of the word wrap function when they reply to an email and the text of the previous email appears with a highly irregular margin and seemingly random spaces and returns.