---
title: p.step.example
description: "## Syntax **p.step.example** ## Purpose The p.step.example annotation is used to tag an element as being an example of a step. An example can contain multiple other elements, such as paragraphs, code, or preformatted text. This annotation is similar to…"
url: "https://www.stilo.com/docs/migrate/prolog/p-step-example/"
updated: "2023-11-10"
category: Annotations / Prolog
tags:
  - Annotations
---

# p.step.example

## Syntax

**p.step.example**

## Purpose

The p.step.example annotation is used to tag an element as being an example of a step. An example can contain multiple other elements, such as paragraphs, code, or preformatted text. This annotation is similar to p.step.info, but this annotation provides a clear, specific example of the procedure in question.

## Examples

The following is an example of a time where you might want to use the p.step.example annotation:

![](https://www.stilo.com/wp-content/uploads/2023/11/stilo-dita-xml-annotation-p.step_.example0.png)

The following is an example of a rule that will apply p.step.example:

![](https://www.stilo.com/wp-content/uploads/2023/11/stilo-dita-xml-annotation-p.step_.example1.png)

 

The following is the DITA XML output for the previous rule:

 

<step>

<cmd>Enter the code for your function.</cmd>

<stepxmp><p>For example:&#x2028;def sampleFunction(x, y):&#x2028;  z = x + y&#x2028;            print(&#x201c;The sum is &#x201c; + str(z))</p><p>For an example of a function without arguments:</p><codeblock>def sampleFunction():&#x2028;          print(&#x201c;This is a cool function&#x201d;)</codeblock></stepxmp>

</step>

 

 
