Documentation Center

HTML Whitespace

Use the global whitespace settings on the Whitespace page to define how SDL Trados Studio should deal with any extra whitespace characters it finds in the elements of an HTML document.

To open the Whitespace page for your HTML file type, click File > Options > File Types > [HTML file type] > Whitespace.

The global whitespace settings control the whitespace configurations for:
  • HTML elements that are not subject to a parser rule
  • content extracted as non-translatable from any HTML element
  • whitespace found in the attributes of any element

Studio considers spaces, non-breaking spaces, tabs and line breaks as whitespace. Preservation means that Studio will not modify any whitespace found in the HTML element. Normalization means that Studio will replace any whitespace found in the HTML element with a single space_Whitespace.

OptionDescription
Whitespace in content

This option controls the whitespace settings for the translatable content in HTML elements which are not subject to a parser rule.

For HTML elements subject to a parser rule, Studio only applies this global Whitespace in content setting if the Whitespace property on the Add/Edit/Copy Rule page is set to Inherit from parent and the last specified parent is also set to Inherit from parent.

Set the Whitespace property to one of the following:
  • Always preserve - Studio keeps the whitespace it finds and does not replace it with a single space.
  • Normalize unless xml:space='preserve' - Studio replaces whitespace with a single space unless the element includes the attribute xml:space='preserve'.
  • Always normalize - Studio always replace whitespace with a single space, ignoring any xml:space='preserve' attribute.
Whitespace in tags

This option controls the settings for the whitespace found in non-translatable content and in element attributes.

Check the Always normalize option if you want Studio to replace any whitespace found with a single space.

Related topics