Creating indents in a word processor is a trivial task that you hardly even need to think about. In HTML-based formats indents are not quite so straightforward. HTML does not support either tab stops or multiple spaces, so you cannot use them to create indented paragraphs or to format tabular data. (Tabs and multiple spaces wouldn't work in HTML because the page width is dynamic.)
You can use indented paragraphs – Help+Manual will convert them to stable HTML structures when you publish to HTML-based formats. However, you should avoid using tab stops and spaces on their own to create indented effects, because these will not work in HTML-based outputs. You should always use the paragraph indenting functions described below.
For some more background information see Tabs, indents and HTML in the Reference section.
Key Information
You cannot use the indent tools on single-level bulleted and numbered lists. To change the indent in a list you must first switch off the list with the list tool. In outline numbered lists the indent tools change the list level.
|
•Use the indent tools in to increase and decrease indents.
OR:
•Press and the or - key to increase and decrease indents.
OR:
•Drag the Indent tool in the ruler above the editor. The tool has three parts, which can all be dragged separately: The upper triangle adjusts the first-line indent, the lower triangle adjusts the main paragraph indent and the square box at the bottom adjusts the first line and the paragraph indent together.
OR:
•Select the paragraph dialog icon in and set the indent values manually.
|
Hanging indents work in all publishing formats, including HTML-based formats where they are converted to stable table structures. Hanging indents are formatted in the editor with a single tab stop between the "hanging" portion and the main paragraph. This is the only place where you should use a tab stop for HTML-based output. Use only one tab and don't add any spaces, otherwise you will get errors in HTML output.
•Use the Indent tool in the Toolbar to define the hanging indent:
OR:
•Select and set the indent values in the Indentation section.
See Tabs, indents and HTML in the Reference section for more information on hanging indents and how they are converted in HTML-based output.
|
You can set negative indents to put part of a paragraph to the left of the normal natural margin of the page. To do this, enter a negative number like -24 in the Left: or Right: box for the indents. Alternatively just use the down arrow next to the field to go "down" below zero.
This is mainly useful for output to PDF, DOCX and eBooks when you want to put something like an icon to the left or right of the main body of the text. If you apply a negative indent to the container paragraph of a table, you can put an entire table column to the left or right of the normal margin for a sidebar effect.
|
In normal text:
Generally you should never indent text with leading spaces, it is much better to use real paragraph indents. In HTML multiple spaces are normally always interpreted as a single space – Help+Manual gets around this by converting multiple spaces to alternating soft and hard space characters. However, this still may not produce the results you need because different browsers can interpret the widths of these different space characters in different ways.
In program code:
Program code is often automatically indented with leading spaces. To get this to display correctly you just need to turn word wrap off in the paragraph settings of your code examples, either manually or with a style. Then all the spaces will be converted to hard space entities which will render correctly in all browsers. Paragraphs will not wrap, but you don't want paragraphs to wrap in program code. See Formatting program source code for more details.
|
In HTML hanging indents are turned into tables. This means that the left part of the hanging indent will wrap inside the table cell if it is too long to fit. If you are only outputting to HTML-based publishing formats this means you can make the left part of the indent as long as you like because it will wrap in your output.
The indent in the editor:
This shows the paragraph with the
overlong text in the editor.
Result in HTML output format:
This shows the output in HTML
Help or Webhelp.
You can't use this trick if you are also outputting to PDF, printed manuals or Word DOCX. It only works in HTML-based output!
|
See also:
Tabs, indents and HTML