Rags is an informal term used in typesetting, typography and layout to describe an uneven margin for a vertical column of type. It can apply to either print or digital text, according to the visual organization of the text.
In Western text that reads left to right, the right margin is usually the one that suffers from an uneven appearance.
One of the most basic strategies for dealing with rags is manual line breaks that keep each line of text carefully coordinated to create subtle changes from one line of text to another. These strategies should result in columns that are not distracting to the reader. By contrast, a ragged margin can create strange whitespace that can distract the reader’s eye from the page.
In addition to manual line breaks, changes in fonts, font sizes or column or block sizes can also have a positive effect on rags. However, some types of web layout require more specialized and detailed tools. Web designers and others dealing with browser-rendered text can use specific features in Cascading Style Sheets (CSS) to effectively set consistent rules for creating well-aligned margins and dealing with rags. These issues also can be important in responsive design, where professionals have to try to ensure that a piece of text looks good on any device.
This definition was written in the context of typography