XML technologies / XSL-FO / XSL-FO introduction / Inline formatting

The <fo:inline> element differs from <fo:block> because no paragraphs are made but contents are inserted in the line. Therefore almost all attributes being valid for the <fo:block> element are also applicable for <fo:inline>.

One exception are the margin attributes which are not permitted for <fo:inline> and do not make sense here. Since inline contents are also formatted in inline blocks, other spacing attributes such as space-after, space-end, padding etc. can be used.

Typically, the <fo:inline> element is used in order to highlight individual characters, words and word orders. In this book examples for highlighting are the element and attribute names which are displayed in a monospace font but also emphases by bold, italic or underlined words.

An important note has to be made regarding the line break within <fo:inline>. Contents being inserted with <fo:inline> are not automatically broken between the lines! For this purpose it is required to insert the keep-together.within-line="no" attribute because the default value for this attribute is yes.

back to top