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 menu bar. In Microsoft Word, you can edit page margins using the Layout tab in the ribbon located above the document.from the program's
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.