Edit This Code:
<!DOCTYPE html>
<html>
<title>W3.CSS</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="../lib/w3.css">
<body class="w3-container">

<h2>Progress Bar Labels</h2>
<p>Add a new element inside the "w3-progressbar" to add a label to the progress bar.</p>
<p>Tip: Use the w3-center class to always keep the label centered. If omitted, it will be left aligned.</p>

<div class="w3-progress-container">
  <div id="myBar" class="w3-progressbar w3-green" style="width:25%">
    <div class="w3-center w3-text-white">25%</div>
  </div>
</div><br>

<div class="w3-progress-container">
  <div id="myBar" class="w3-progressbar w3-red" style="width:50%">
    <div class="w3-center w3-text-white">50%</div>
  </div>
</div><br>

<div class="w3-progress-container w3-light-blue">
  <div id="myBar" class="w3-progressbar w3-blue" style="width:75%">
    <div class="w3-center w3-text-white">75%</div>
  </div>
</div>

</body>
</html>


Result:
Try it Yourself - © w3schools.com
Privacy Policy