Styles

Within a WordprocessingML file, styles are predefined sets of table, numbering, paragraph, and/or character properties which can be applied to text within the document. This allows the formatting properties to be stored and managed independently from the content, allowing the look of document content to be changed in a single location (e.g. the look of all first-level headings is changed by changing the style with @styleId Heading1 rather than looking for and changing each paragraph in the document).

example:

Each style defined within a WordprocessingML document requires a style definition. The style definition contains all of the information needed by a consumer to store and display that style within a WordprocessingML document, and is defined using the <style> element. The style definition for any style in WordprocessingML can be divided into three segments The complete definition of style properties can be found on the reference for the <style> element (§2.7.3.17):

  • General style properties

  • Style types

  • Type specific formatting properties

Each of these three segments are discussed in the following subclauses.