Bootstrap star icon

In this, we learn how to show star 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"></i>


increase icon size using inline css

change icon color using inline css

use icon with html button tag

Full Code
<!Doctype html>
	<title>Bootstrap star icon</title>
	<link rel="stylesheet" href="">
	<h1 align="center">Bootstrap star icon</h1>

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

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

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

With Anchor Tag

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

With Input Tag

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"></i>
	<input type="text" class="form-control" placeholder="Input group example" aria-label="Input group example">
Icon With Button Tag

With Button Tag

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

Icon Svg code

<h1 align="center">Icon Svg code</h1>
<svg xmlns="" width="16" height="16" fill="currentColor" class="bi bi-star" viewBox="0 0 16 16">
  <path d="M2.866 14.85c-.078.444.36.791.746.593l4.39-2.256 4.389 2.256c.386.198.824-.149.746-.592l-.83-4.73 3.522-3.356c.33-.314.16-.888-.282-.95l-4.898-.696L8.465.792a.513.513 0 0 0-.927 0L5.354 5.12l-4.898.696c-.441.062-.612.636-.283.95l3.523 3.356-.83 4.73zm4.905-2.767-3.686 1.894.694-3.957a.565.565 0 0 0-.163-.505L1.71 6.745l4.052-.576a.525.525 0 0 0 .393-.288L8 2.223l1.847 3.658a.525.525 0 0 0 .393.288l4.052.575-2.906 2.77a.565.565 0 0 0-.163.506l.694 3.957-3.686-1.894a.503.503 0 0 0-.461 0z"/>

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