Introduction to Mallard

Inline elements

About

You can use inline elements within block elements (such as paragraphs) or within other inline elements to identify names of applications, file names, code snippets, commands, output, GUI labels, GUI sequences, keyboard strokes and sequences, system items, variables, graphics, multimedia objects, and other commonly occurring types of content in software help documentation. You can also use inline elements to create links and spans or to add simple emphasis. 

Wrapping this kind of content within an inline element means that the content can be given a distinct style that will give the user a useful visual clue. Even if the content remains un-styled, however, this kind of semantic markup is often very useful for other documentation content producers. 

Example 

<p>To open a file in <app>Beanstalk</app>, select <guiseq><gui>File</gui><gui>Open</gui></guiseq> from the menu and choose the file you would like to open. If you prefer to use the <app>Beanstalk CLI</app>, you can enter <cmd>beanstalk <var>file</var></cmd> at the command line, replacing <var>file</var> with the name of the file.</p>

Inline links

One of the most commonly used inline elements is <link>. The <link> element takes an xref or href attribute depending on whether you are linking to an internal or external page. For example, you may want to link a <gui> command sequence to a page where it has been described in greater detail. The value of the xref attribute would be the ID of the linked page, while the value of the href attribute would be the URI of the external page. Inline links can also take an action attribute that will perform a particular action when a link is clicked. Links can also be created by putting an xref or href attribute within any inline element.

In the example below, a one-way link is created to the section whose id="open" in the topic page whose id="file_menu".

Inline link example 

<p>To open a file in <app href="www.example.com">Beanstalk</app>, <link  xref="file_menu#open">select
<guiseq><gui>File</gui><gui>Open</gui></guiseq></link> from the menu and choose the file you would like to open.</p>

Learn more

For more on Mallard inline elements, see http://projectmallard.org/1.0/mal_inline