# Display Conditions

<Callout type="caution" title="Display conditions work with attributes only, not tags">
Conditional rows are driven by **contact attributes** (custom fields), never by **tags** or interests. To show or hide a row for certain contacts, you must first create an **attribute**, add its values to your contacts, then build your condition on that attribute. A condition written against a tag will **not** work.
</Callout>

## What this does

A display condition shows or hides a **row** in your email depending on the data you hold on each contact. The content is chosen per recipient from a **contact attribute**, for example a `language`, `country`, or `plan` attribute, so each person sees the row that fits them. This is what makes an email feel personalized.

## Why it matters

Personalized content lifts engagement: people interact more with a message that speaks to them. Showing the right row to the right contact (and hiding the rest) builds stronger relationships and better results, without sending separate campaigns to each segment.

## Before you start: create your attribute

Because display conditions read **attributes only**, set the attribute up first:

<Stepper>

1. Create the **attribute** on your contact list. See [adding attributes to your list](/en/docs/audience/adding-attributes-to-your-list).

2. Make sure your contacts have a **value** in that attribute (for example, `language` = `en_US`). A contact with no value won't match a condition.

</Stepper>

<Callout type="note" title="Tags and interests won't work here">
If your list only separates people with **tags** or **interests**, a display condition can't read them. Turn the distinction you need into an **attribute** first, then condition on that attribute.
</Callout>

## Add a display condition to a row

<Stepper>

1. Open the campaign in the email designer.

2. In the **Rows** section, drag a row into your content and select it.

3. In the row properties, select **Add Condition**. The **Edit display condition** dialog opens.

4. Fill in the condition (see **Writing the condition** below), then click **Save**.

5. Preview it with the **eye** icon, and pick an attribute value in Preview mode to see the row show or hide.

</Stepper>

The saved condition appears in the row properties menu.

## Writing the condition

The **Edit display condition** dialog has four fields:

- **Name**: a short label for you, for example *English*.
- **Description**: an optional note about what the condition does.
- **Before**: the opening tag that starts the condition. This is where you reference the **attribute** and the value(s) to match.
- **After**: the closing tag, always `[ENDIF]`.

You write the condition as code. Reference the attribute by its name in backticks, compare it with `=`, put text values in double quotes, and combine several values with `OR` (or narrow with `AND`).

**Example:** show a row only to contacts whose `language` attribute is `en_US` or `en`.

```text
Before:  [IF `language` = "en_US" OR `language` = "en" ]
After:   [ENDIF]
```

Everything in the row between the **Before** and **After** tags is shown only when the condition is true. For contacts who don't match, the row is hidden, so add a separate row (or condition) with fallback content if they should still see something.

## Troubleshooting

**My condition using a tag or interest does nothing**

- This is expected. Display conditions read **attributes only**. Create an attribute that holds the value you need, populate it on your contacts, and condition on that attribute instead.

**The row is hidden for everyone**

- Check that your contacts actually have a **value** in the attribute, and that it matches the condition exactly (`en_US` is not the same as `EN_US` or `en`).
- Confirm the attribute name in the **Before** tag matches the attribute name on your list, spelled exactly, inside backticks.

**The row shows for the wrong contacts**

- Review your logic: `OR` widens the match, `AND` narrows it.
- Make sure the value in quotes matches what's stored on the contact.

**Some contacts see a blank space**

- A hidden row leaves nothing in its place. Provide fallback content in a separate row for contacts who don't match the condition.

## Related articles

- [Adding attributes to your list](/en/docs/audience/adding-attributes-to-your-list) - Create the fields conditions read
- [Using dynamic content](/en/docs/personalization/using-dynamic-content) - More conditional content
- [Adding merge tags to a campaign](/en/docs/personalization/adding-merge-tags-to-a-campaign) - Insert attribute values inline
- [Creating dynamic segments](/en/docs/audience/creating-dynamic-segments) - Target by attribute
