In typography, a margin is the area between the main content of a page and the page edges. The margin helps to define where a line of text begins and ends. When a page is justified the text is spread out to be flush with the left and right margins. When two pages of content are combined next to each other (known as a two-page spread), the space between the two pages is known as the gutter. (Any space between columns of text is a gutter.) The top and bottom margins of a page are also called "head" and "foot", respectively. The term "margin" can also be used to describe the edge of internal content, such as the right or left edge of a column of text.
Marks made in the margins are called marginalia.
Margins are an important method of organizing the written word, and have a long history. In ancient Egypt, writing was recorded on papyrus scrolls. Egyptian papyrus scrolls could reach up to 30 metres in length, and contained text organized in columns laid out from left to right along the scroll. Columns were referred to as pagina (or pages) and were separated by margins, so that scrolls could be unrolled horizontally, uncovering individual sections one by one. Thus, in papyrus scrolls margins performed the function of visually signaling to readers when to stop reading and move down to the next line of text.
During the first three centuries BC, the scroll gradually began to be replaced by the codex. Rather than storing text on one long, continuous piece of papyrus, the codex was constructed of individual pieces of parchment, bound together on one side. Now that each page was separated physically from all the rest, margins became less necessary in distinguishing the beginning and end of the text-block. However, they took on a new role. Before the codex, commentaries about a text were usually recorded on separate scrolls. With the advent of the codex, margins (having been largely stripped of their original function) became extra space which could be used to incorporate commentaries next to the original text. Extra text and images included in the margins of codices are called marginalia. Scholarly commentaries included in margins next to their source text are known as scholia. However, this was not the only purpose margins served in the codex. Even when no commentaries were added, most books continued to leave space around the text-block on all sides of each page. This marginal space served several practical purposes. Leaving blank space around text protects the typeblock by giving the reader somewhere to put his or her thumbs while holding the book. In addition, that blank space serves an important role in reading and understanding text. The exact effect of margins on legibility has been debated, but some scholars contend that without empty space to offset text, the task of reading could take more than twice as long. Finally, margins serve an aesthetic function by framing text inside a blank border.
With the invention of the printing press, books began to be manufactured in large numbers. As paper began to be produced in bulk, page size and shape were increasingly determined by the size and shape of mould which was most practical for producers. As pages became more standardized, so did the size and shape of margins. In general, margins in books have grown smaller over time. The wide margins common during the Renaissance have given way to much narrower proportions. However, there is still much variation depending on the size and purpose of the book.
Computers and the Internet have revolutionized our consumption of the written word. Books can now exist without physical pages, and text can be viewed on a myriad of devices. In the early days of the Internet, the concept of margins was foreign to web browsers. However, as computer screens got bigger this became an issue for the readability and aesthetics of text. The invention of more sophisticated techniques such as CSS allowed designers to control the margins of their web pages and leave more white space. Although margin-less web pages do still exist, today it is generally understood that having wide enough margins to provide adequate white space around text is important to the usability and readability of digital text. In fact, margins become even more important because web content shares visual space with other elements such as the web browser's interface, as well as other icons and windows.
Margins also play an important role in digital word-processing. The default margins for Microsoft Word from version 2007 onward have been 1 inch (25.4 mm) all around; in Word 2003, the default top and bottom margins were 1 inch (25.4 mm), but 1.25 inches (31.7 mm) were given at the left and the right. OpenOffice Writer and LibreOffice Writer have 0.79 inch (20 mm) all around. LaTeX varies the width of its margins depending on the font size. By default, LaTeX uses 1.5 inches margin sizes for 12pt documents, 1.75 inches for 11pt, and 1.875 inches for 10pt—relatively large margins. These adjustments are intended to allow a maximum of 66 characters per line, to increase readability.