Home > Guides > Tag Developers Guide > Struts Tags > Tag Reference > Generic Tag Reference > if |

Apache Struts 2 Documentation
if
Edit Page Browse Space Add Page Add News

Please make sure you have read the Tag Syntax document and understand how tag attribute syntax works.

## Description

Perform basic condition flow. 'If' tag could be used by itself or can be followed by zero or more 'Else if' Tags followed by zero or one 'Else' Tag.

## Parameters

{snippet:id=tagattributes|javadoc=false|url=struts2-tags/if.html}

## Examples

{snippet:id=example|lang=xml|javadoc=true|url=struts2/core/src/main/java/org/apache/struts2/components/If.java}