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 . (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 meters 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 3 centuries B.C.E., the scroll gradually began to be replaced by the codex. Rather than storing text on one long, continuous piece of whatever 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.