The {code} tag pair will output the contents of the code element.

{code}
   <pre>{value}</pre>
{/code}

You can use the following parameters with your {code} tag:

char_limit=

{code char_limit="5"}
   <pre>{value}</pre>
{/code}

This parameter shortens the value being displayed.

The following single variables are available within your {code} tag pair:

{value}

Displays the contents of {code} element.

{raw}

Displays the contents of {code} element without formatting HTML special characters (e.g. for embed videos).

{element_name}

Sometimes, you might want to use several code elements, each with a different style. The {code} tag will help you to determine which code element is being displayed.

For example, you can add a regular Code and an Inverted Code in the field settings. In order to apply a different style on the Inverted Code element, use the following code:

{code}
	{if element_name=="Inverted Code"}
		<div class="inverted">{value}</div>
	{if:else}
		{value}
	{/if}
{/code}