Saved X
Google login
SignUp with Email
X

Bootstrap star half icon

In this, we learn how to show star half 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.

star half
<i class="bi-star-half"></i>
Example

star half

increase icon size using inline css

change icon color using inline css

use icon with html button tag

Full Code
<!Doctype html>
<html>
<head>
	<title>Bootstrap star half 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 half icon</h1>

	<p>increase icon size using inline css</p>
	<p>
		<i class="bi-star-half"></i>
		<i class="bi-star-half" style="font-size:20px"></i>
		<i class="bi-star-half" style="font-size:30px"></i>
		<i class="bi-star-half" style="font-size:40px"></i>
		<i class="bi-star-half" style="font-size:50px"></i>
	</p>

	<p>change icon color using inline css</p>
	<p>
		<i class="bi-star-half"></i>
		<i class="bi-star-half" style="color:red"></i>
		<i class="bi-star-half" style="color:blue"></i>
		<i class="bi-star-half" style="color:green"></i>
	</p>

	<p>use icon with html button tag</p>
	<p>
		<button style="padding: 5px">
			<i class="bi-star-half"></i> button
		</button>
	</p>
</body>
</html>
Icon With Anchor Tag

With Anchor Tag

Link
Code
<h1 align="center">with anchor tag</h1>
<a href="javascript:void(0);">
	<i class="bi-star-half" style="font-size:16px"></i> Link
</a>
Icon With Input Tag

With Input Tag

Use this with bootstrap css.

Code
<h1 align="center">with Input tag</h1>
<div class="input-group w-50">
	<span class="input-group-text">
		<i class="bi-star-half"></i>
	</span>
	<input type="text" class="form-control" placeholder="Input group example" aria-label="Input group example">
</div>
Icon With Button Tag

With Button Tag

Code
<h1 align="center">with button tag</h1>
<button style="padding: 5px">
	<i class="bi-star-half"></i> Button
</button>
Icon Html svg code

Icon Svg code

Code
<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-half" viewBox="0 0 16 16">
  <path d="M5.354 5.119 7.538.792A.516.516 0 0 1 8 .5c.183 0 .366.097.465.292l2.184 4.327 4.898.696A.537.537 0 0 1 16 6.32a.548.548 0 0 1-.17.445l-3.523 3.356.83 4.73c.078.443-.36.79-.746.592L8 13.187l-4.389 2.256a.52.52 0 0 1-.146.05c-.342.06-.668-.254-.6-.642l.83-4.73L.173 6.765a.55.55 0 0 1-.172-.403.58.58 0 0 1 .085-.302.513.513 0 0 1 .37-.245l4.898-.696zM8 12.027a.5.5 0 0 1 .232.056l3.686 1.894-.694-3.957a.565.565 0 0 1 .162-.505l2.907-2.77-4.052-.576a.525.525 0 0 1-.393-.288L8.001 2.223 8 2.226v9.8z"/>
</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.

More icons