In this, we learn how to show star fill icon in bootstrap, How do i increase its size and change color.
Use this icon with a tag.
Use this icon with input tag.
Use this icon with button tag.
Use this icon as svg.
<i class="bi-star-fill"></i>
increase icon size using inline css
change icon color using inline css
use icon with html button tag
<!Doctype html>
<html>
<head>
<title>Bootstrap star fill icon</title>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.5.0/font/bootstrap-icons.css">
</head>
<body>
<h1 align="center">Bootstrap star fill icon</h1>
<p>increase icon size using inline css</p>
<p>
<i class="bi-star-fill"></i>
<i class="bi-star-fill" style="font-size:20px"></i>
<i class="bi-star-fill" style="font-size:30px"></i>
<i class="bi-star-fill" style="font-size:40px"></i>
<i class="bi-star-fill" style="font-size:50px"></i>
</p>
<p>change icon color using inline css</p>
<p>
<i class="bi-star-fill"></i>
<i class="bi-star-fill" style="color:red"></i>
<i class="bi-star-fill" style="color:blue"></i>
<i class="bi-star-fill" style="color:green"></i>
</p>
<p>use icon with html button tag</p>
<p>
<button style="padding: 5px">
<i class="bi-star-fill"></i> button
</button>
</p>
</body>
</html>
<h1 align="center">with anchor tag</h1>
<a href="javascript:void(0);">
<i class="bi-star-fill" style="font-size:16px"></i> Link
</a>
Use this with bootstrap css.
<h1 align="center">with Input tag</h1>
<div class="input-group w-50">
<span class="input-group-text">
<i class="bi-star-fill"></i>
</span>
<input type="text" class="form-control" placeholder="Input group example" aria-label="Input group example">
</div>
<h1 align="center">with button tag</h1>
<button style="padding: 5px">
<i class="bi-star-fill"></i> Button
</button>
<h1 align="center">Icon Svg code</h1>
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-star-fill" viewBox="0 0 16 16">
<path d="M3.612 15.443c-.386.198-.824-.149-.746-.592l.83-4.73L.173 6.765c-.329-.314-.158-.888.283-.95l4.898-.696L7.538.792c.197-.39.73-.39.927 0l2.184 4.327 4.898.696c.441.062.612.636.282.95l-3.522 3.356.83 4.73c.078.443-.36.79-.746.592L8 13.187l-4.389 2.256z"/>
</svg>
Note :- You can use Bootstrap icons with i and span tag.
Note:- Use this icon with or without Bootstrap.
Download the svg of this icon and add in your document.