# cfelseif

Used as a control block in a cfif tag block to handle any case
 not identified by the cfif tag or a cfelseif tag.




### Syntax

```
<cfelseif> 
```



#### Script Syntax

```
else if (expression) { }
```






## CFML Engine Support

The cfelseif tag is supported on the following CFML engines:

| Engine | Minimum Version | Notes |
| --- | --- | --- |
| ColdFusion |  |  |
| Lucee |  |  |




## Examples


### Script Syntax



```
count = 10; 
 if (count > 20) { 
 writeOutput(count); 
 } else if (count == 8) { 
 writeOutput(count); 
 } else { 
 writeOutput(count); 
 }
```



### Tag Syntax



```
<cfset count = 10> 
 <cfif count GT 20> 
 <cfoutput>#count#</cfoutput> 
 <cfelseif count EQ 8> 
 <cfoutput>#count#</cfoutput> 
 <cfelse> 
 <cfoutput>#count#</cfoutput> 
 </cfif>
```






## Related Tags and Functions

[cfif](https://cfdocs.org/cfif.md)
[cfelse](https://cfdocs.org/cfelse.md)




The human version of this document can be found here: [https://cfdocs.org/cfelseif](https://cfdocs.org/cfelseif) which is part of the cfdocs.org repository. Project created by [Pete Freitag](https://www.petefreitag.com) and sponsored by [Foundeo Inc.](https://foundeo.com/)
