What’s Word Wrap?

Print anything with Printful



Word wrap is a feature in word processors and web coding that automatically wraps text to the next line within defined margins. It can be turned on and off and can include hyphenation to create a justified margin. Different browsers and platforms may affect the appearance of word wrapping.

Word wrap is a feature that wraps text to the next line so that it stays within a set of defined margins. Most word processors have this feature so that people don’t have to insert a carriage return at the end of every line, and there are a variety of ways to play with carriage return within documents. The coding used to create websites can also integrate a word wrap function, allowing the designer more control over the presentation of the site.

Most word processors have carriage return, which automatically carries text to the next line when it reaches 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 wrap around the lines, ignoring the soft returns created by the carriage return function while keeping the hard returns entered by the user. Word processors use word wrap algorithms so that long lines of text don’t force the user to scroll sideways to read more.

In a word processor, carriage return creates line breaks between words, with the goal of avoiding excessive hyphenation, unless the user specifies otherwise. The newline will also break a long word with no spaces to maintain typographical integrity. In other words, if a word is so long that it spans an entire line, the word processor will add a dash to break up the word so that the text appears within the margins you set.

People can force wrapping on and off with many word processors and graphic design programs to achieve a specific look. Sometimes, for example, users want total control over line breaks, in which case they can turn the feature off so they can dictate where lines end and start. In other cases, users can leave line breaks at the computer, specifying whether or not they want dashes if words appear near the end of a line. Hyphenation can help create a crisp and justified margin, while lack of hyphenation usually causes jagged margins, although users can also play with the spacing within lines to even out unhyphenated margins.

In web coding, word wrapping can be extremely important, both to control appearance and to keep text confined to specific areas. Many browsers support both word wrapping, which preserves particular margins, and word breaking, where long words with no spaces will be forcibly broken to maintain text appearance. Unfortunately, because people view text in different browsers and on different platforms, the break-word function can sometimes make typography look strange. People may have noticed a break in the carriage return function when replying to an email and text from the previous email appears with a very ragged margin and seemingly random spaces and returns.




Protect your devices with Threat Protection by NordVPN


Skip to content