Font Awesome Traffic Light Icon (Signal, Stoplight, Safety)

In this tutorial We will learn how to use Font Awesome Traffic Light Icon. It used refers to One of a set of colored lights at intersections, crossroads, etc. to control the flow of traffic. A red light indicates that traffic must stop and a green light that you can go. If you want to edit or customize this traffic light icon, utilize the 'Try It' editor to change its color, size, and animation.


Fontawesome Version 5.X

traffic light

<i class='fas fa-traffic-light'></i>

traffic light

<i class='fas fa-traffic-light' style='color: white'></i>

traffic light

<i class='fas fa-traffic-light' style='color: red'></i>

traffic light

<i class='fas fa-traffic-light' style='color: blue'></i>

traffic light

<i class='fas fa-traffic-light' style='color: #f3da35'></i>
Try it Yourself

Fontawesome Version 6.X

traffic light

Web

<i class='fa-solid fa-traffic-light'></i>

React

<FontAwesomeIcon icon="fa-solid fa-traffic-light" />

Vue

<font-awesome-icon icon="fa-solid fa-traffic-light" />

traffic light

Web

<i class='fa-solid fa-traffic-light' style='color: white'></i>

React

<FontAwesomeIcon icon="fa-solid fa-traffic-light" style={{color: 'white'}} />

Vue

<font-awesome-icon icon="fa-solid fa-traffic-light" :style="{color: 'white'}" />

traffic light

Web

<i class='fa-solid fa-traffic-light' style='color: red'></i>

React

<FontAwesomeIcon icon="fa-solid fa-traffic-light" style={{color: 'red'}} />

Vue

<font-awesome-icon icon="fa-solid fa-traffic-light" :style="{color: 'red'}" />

traffic light

Web

<i class='fa-solid fa-traffic-light' style='color: blue'></i>

React

<FontAwesomeIcon icon="fa-solid fa-traffic-light" style={{color: 'blue'}} />

Vue

<font-awesome-icon icon="fa-solid fa-traffic-light" :style="{color: 'blue'}" />

traffic light

Web

<i class='fa-solid fa-traffic-light' style='color: #f3da35'></i>

React

<FontAwesomeIcon icon="fa-solid fa-traffic-light" style={{color: '#f3da35'}} />

Vue

<font-awesome-icon icon="fa-solid fa-traffic-light" :style="{color: '#f3da35'}" />
Try it Yourself

How to add Font Awesome traffic light Icon ?

Font Awesome Icon fas fa traffic light Icon can be added to any web page simply as below. You can integrate Icon in web pages by just adding following below syntax & icon code.

Icon -
<i class='fas fa-traffic-light'></i>
Icon Code -
fas fa-traffic-light

HTML Code

Get complete html code for icon traffic light

                    
                    <!DOCTYPE html>
                    <html>
                        <head>
                        <title>Page Title</title>
                        <link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.5.0/css/all.css" integrity="sha384-B4dIYHKNBt8Bc12p+WXckhzcICo0wtJAoU8YZTY5qE0Id1GSseTk6S+L3BlXeVIU" crossorigin="anonymous">
                       </head>
                        <body>
                        <i class='fas fa-traffic-light'></i>
                        </body>
                    </html>                    

Tags

Signal,Stoplight,Safety,Crossing,Road

Change Font Awesome Icon Traffic light Color

Sometimes we need icons in different color, as we suggested by adding css style we can change color. Here we have created one example to change color of icons with css classes.


    <style>
.blue-color {
color:blue;
}
.green-color {
color:green;
}
.teal-color {
color:teal;
}
.yellow-color {
color:yellow;
}
.red-color {
color:red;
}
</style>
<i class='fas fa-traffic-light blue-color'></i> <i class='fas fa-traffic-light green-color'></i> <i class='fas fa-traffic-light teal-color'></i> <i class='fas fa-traffic-light yellow-color'></i> <i class='fas fa-traffic-light red-color'></i>

Output of the above example will be as below-


Note- Make Sure You have included the below Font Awesome file in header-
            
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.5.0/css/all.css" integrity="sha384-B4dIYHKNBt8Bc12p+WXckhzcICo0wtJAoU8YZTY5qE0Id1GSseTk6S+L3BlXeVIU" crossorigin="anonymous">            
            
Related Icons

Traffic Light Icon Font Awesome - FAQs

⭐What is the Font Awesome Traffic Light Icon code?

Icon Code is - fas fa-traffic-light.

⭐ What does the fas fa-traffic-light Icon mean?

fas fa-traffic-light is the Icon code of Font Awesome Traffic Light.

⭐ Can we add fas fa-traffic-light Icon in different sizes?

Yes, you can Icon of fas fa-traffic-light in various pixels.

⭐ How to add a Blue color Font Awesome Traffic Light Icon?

Add the blue color Traffic Light icon of the font awesome by using code: fas fa-traffic-light style='color: blue;'.

⭐ How to make white color icon of a Font Awesome Traffic Light?

To change the Traffic Light icon to white color use code: fas fa-traffic-light style='color: white;'.

Advertisements



Advertisements



Looking For More Icons?