fa-file-alt icon in font awesome icons

fa-file-alt icon in font awesome icons has 2 variants regular (far) and solid (fas)

NameClass NameCss Content Code
fa-file-altfa-file-altf15c

fa-file-alt icon Usage

To display fa-file-alt icon add predefined class name i.e.,fa-file-alt (with prefix fa-) to the ‘i’ tag.

Here ‘i’ tag represents icon.

And we need to add corresponding category for fa-file-alt icon. i.e., fas,far.


<i class='fas fa-file-alt'>fa-file-alt</i>
<i class='far fa-file-alt'>fa-file-alt</i>

fa-file-alt fa-file-alt

Change fa-file-alt icon size

To increase fa-file-alt font awesome icon size, use the fa-lg (33% increase), fa-2x, fa-3x, fa-4x, or fa-5x classes along with icon class fa-file-alt.

Increase in icon size will be relative to their parent container.


<i class='fas fa-file-alt fa-lg'>fa-lg</i><br/>
<i class='fas fa-file-alt fa-2x'>fa-2x</i><br/>
<i class='fas fa-file-alt fa-3x'>fa-3x</i><br/>
<i class='fas fa-file-alt fa-4x'>fa-4x</i><br/>
<i class='fas fa-file-alt fa-5x'>fa-5x</i><br/>
            

fa-lg
fa-2x
fa-3x
fa-4x
fa-5x

fa-file-alt Icon with Fixed Width

All the font awesome icons does not have same width.

For example fa-file-alt icon and fa-home may not have same height and width.

So to display two icons with fixed width and height we can use fa-fw class.


<i class='fas fa-file-alt fa-fw fa-3x'></i>Fixed Width<i class='fas fa-file-alt fa-3x'></i>Normal<br/>
<i class='fas fa-home fa-fw fa-3x'></i>Fixed Width<i class='fas fa-home fa-3x'></i>Normal<br/>

Fixed WidthNormal
Fixed WidthNormal

fa-file-alt Icon Border

To add border to fa-file-alt icon, use fa-border class.

<i class='fas fa-file-alt fa-border fa-3x'></i>

Pull fa-file-alt icon To the left

To pull icon fa-file-alt to the left of the container use fa-pull-left class.\n


<div style='width: 200px;'>
<i class='fas fa-file-alt fa-pull-left fa-3x'></i>
  ... The text after fa-file-alt Icon will be displayed on the right side of the icons
</div>
<div style = 'clear: both;'></div>
... The text after fa-file-alt Icon will be displayed on the right side of the icons

Pull fa-file-alt icon To the right

To pull icon fa-file-alt to the right of the container use fa-pull-right class.


<div style='width: 200px;'>
<i class='fas fa-file-alt fa-pull-right fa-3x'></i>
  ... The text after fa-file-alt Icon will be displayed on the left side of the icons
</div>
<div style = 'clear: both;'></div>
... The text after fa-file-alt Icon will be displayed on the left side of the icons

These two classes can used to add single quotes or double quotes to the text.

Animate fa-file-alt icon using fa-spin

To animate font awesome fa-file-alt icon, use fa-spin class.

<i class='fas fa-file-alt fa-spin fa-3x'></i>

Animate fa-file-alt icon with steps

While animating the font awesome icon,We can rotate fa-file-alt icon in 8 steps instead of uniform rotation.

To animate font awesome fa-file-alt icon with 8 step rotation, use fa-pulse icon along with fa-spin class.

<i class='fas fa-file-alt fa-pulse fa-spin fa-3x'></i>

Rotate fa-file-alt Icon using fa-rotate-x

To rotate the font awesome icon fa-file-alt, Use fa-rotate-x class

Where ‘x’ represents degree of rotation.


<div>
<i class='fas fa-file-alt fa-3x'>R</i>normal<br/><br/>
<i class='fas fa-file-alt fa-rotate-90 fa-3x'>R</i> fa-rotate-90<br/><br/> 
<i class='fas fa-file-alt fa-rotate-180  fa-3x'>R</i> fa-rotate-180<br/><br/> 
<i class='fas fa-file-alt fa-rotate-270 fa-3x'>R</i> fa-rotate-270<br/><br/>
</div>
Rnormal

R fa-rotate-90

R fa-rotate-180

R fa-rotate-270

Flip fa-file-alt Icon using fa-flip-*

To flip fa-file-alt font awesome icon horizontally and vertically use fa-flip-horizontal and fa-flip-vertical classes.


<i class='fas fa-file-alt fa-3x'>F</i> Normal <br>
<i class='fas fa-file-alt fa-flip-horizontal fa-3x'>F</i> fa-flip-horizontal<br>
<i class='fas fa-file-alt fa-flip-vertical fa-3x'>F</i> fa-flip-vertical<br>

F Normal
F fa-flip-horizontal
F fa-flip-vertical

Combine fa-file-alt icon with other font awesome icons

In font awesome icons,using stacking we can combine multiple icons and display it as one icon

To do that use the fa-stack class on the parent, the fa-stack-1x for the regularly sized icon, and fa-stack-2x for the larger icon.

And use class fa-inverse for an alternative icon color. In the below example, I am displaying fa-file-alt on top of icons like fa-square,fa-circle and fa-ban.

And used fa-inverse in the second example to invert the color of the icon.


<div>
    <span class='fa-stack fa-lg'>
        <i class='far fa-square fa-stack-2x'></i>
        <i class='fas fa-file-alt fa-stack-1x'></i>
    </span>
      fa-file-alt on fa-square<br>
    <span class='fa-stack fa-lg'>
        <i class='fas fa-circle fa-stack-2x'></i>
        <i class='fas fa-file-alt fa-stack-1x fa-inverse'></i>
    </span>
      fa-file-alt on fa-circle<br>

    <span class='fa-stack fa-lg'>
        <i class='fas fa-file-alt fa-stack-1x'></i>
        <i class='fas fa-ban fa-stack-2x'></i>
    </span>
      fa-file-alt on fa-ban
</div>
fa-file-alt on fa-square
fa-file-alt on fa-circle
fa-file-alt on fa-ban