Lines & ListsLesson 364Free preview
Wrap Each Line
This lesson is part of Web Developer Tools · All levels
Summary
Wrap Each Line breaks long lines into a few short lines to be easily read at a certain width. Hard wrap inserts the actual newline into the file, whereas soft wrap only folds the display without changing the contents. 72-80 characters long is often used for email, terminal, and diff code.
Key points
- Wrap limits the width of the lines so that it is easy to read
- Hard wrap adds a permanent newline to the file
- The soft wrap only affects the editor's appearance
- Try not to cut the word in the middle so that the text remains clear
- The 72-80 character width is a common choice for text and code
Full lesson
Code examples and quizzes
Full lessons, code examples, and quizzes are available to subscribers. 5 questions.