Home : Technical Terms : Margin Definition


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

Cite this definition:


TechTerms - The Tech Terms Computer Dictionary

This page contains a technical definition of Margin. It explains in computing terminology what Margin means and is one of many technical terms in the TechTerms dictionary.

All definitions on the TechTerms website are written to be technically accurate but also easy to understand. If you find this Margin definition to be helpful, you can reference it using the citation links above. If you think a term should be updated or added to the TechTerms dictionary, please email TechTerms!

Subscribe to the TechTerms Newsletter to get featured terms and quizzes right in your inbox. You can choose to receive either a daily or weekly email.

Sign up for the free TechTerms Newsletter

How often would you like to receive an email?

You can unsubscribe at any time.
Questions? Please contact us.