Margin

Margin is a page layout term used in both print and Web publishing. In print, "margin" typically refers to page borders, while on the Web it describes the spacing between elements on a webpage.

1. Printed Pages

When you create a new document in a word processor, the default margins are usually defined as one inch on all sides. However, depending on the program, the side margins may vary anywhere from 0.75 in to 1.25 inches. These margins create a frame around the content of the page so that the text does not run all the way to the edges. The white space along the edges of the document makes the page look cleaner and the text is easier to read.

In many cases, it is not necessary to edit the page margins. However, some documents, such as school papers, may require specific margins. In these cases, you can edit the margins in your word processor's Document Formatting window. This window can typically be accessed by selecting Format → Document from the program's menu bar. In Microsoft Word, you can edit page margins using the Layout tab in the ribbon located above the document.

2. Webpages

Margin is also a CSS property used for creating space between HTML "block" elements on webpages. It can specify the top, right, bottom, and left margins around an object. Below are several examples of how margins can be specified in CSS.

  • margin: 12px; — 12 pixel margin around all sides of the element
  • margin: 4px 6px; — top and bottom margins: 4 pixels; right and left margins: 6 pixels
  • margin: 10px 15px 20px; 5px; — top: 10px, right: 15px, bottom: 20px, left: 5px margin
  • margin-right: 30px; — 30 pixel margin on the right side of the element

Margins can also be negative values, which may be used to overlay an object on another element within a webpage. In some cases, margins may also be defined as "auto." For example, the CSS declaration "margin: 0px auto;" is often used to center elements on webpages.

Updated October 3, 2012 by Per C.

quizTest Your Knowledge

Which of the following adjusts the output of different audio frequencies?

A
Spectrometer
0%
B
Phaser
0%
C
Equalizer
0%
D
Multiplexer
0%
Correct! Incorrect!     View the Equalizer definition.
More Quizzes →

The Tech Terms Computer Dictionary

The definition of Margin on this page is an original definition written by the TechTerms.com team. If you would like to reference this page or cite this definition, please use the green citation links above.

The goal of TechTerms.com is to explain computer terminology in a way that is easy to understand. We strive for simplicity and accuracy with every definition we publish. If you have feedback about this definition or would like to suggest a new technical term, please contact us.

Sign up for the free TechTerms Newsletter

How often would you like to receive an email?

You can unsubscribe or change your frequency setting at any time using the links available in each email.

Questions? Please contact us.