🔥 $100K Hit! Where Will Bitcoin Go Next? Find Out Live!

Code has been added to clipboard!

HTML Progress Bar

Reading time 2 min
Published Jun 29, 2017
Updated Oct 3, 2019

HTML Progress Bar: Main Tips

  • Introduced in HTML5, progress element represents a certain ongoing task and might indicate its level of completion.
  • It works in a similar fashion to the HTML gauge.
  • HTML progress bars can be determinate or indeterminate.
  • The ending tag cannot be omitted.
  • You can easily style the progress bar with Bootstrap.

Tracking HTML Progress

The progress tags are used to specify an HTML progress bar:

Example
<p>Donuts eaten:</p>
<progress value="60" max="100"></progress>

DataCamp
Pros
  • Easy to use with a learn-by-doing approach
  • Offers quality content
  • Gamified in-browser coding experience
  • The price matches the quality
  • Suitable for learners ranging from beginner to advanced
Main Features
  • Free certificates of completion
  • Focused on data science skills
  • Flexible learning timetable
Udacity
Pros
  • Simplistic design (no unnecessary information)
  • High-quality courses (even the free ones)
  • Variety of features
Main Features
  • Nanodegree programs
  • Suitable for enterprises
  • Paid Certificates of completion
edX
Pros
  • A wide range of learning programs
  • University-level courses
  • Easy to navigate
  • Verified certificates
  • Free learning track available
Main Features
  • University-level courses
  • Suitable for enterprises
  • Verified certificates of completion

Possible progress Tag Attributes

There are two optional attributes you can use with HTML5 progress bars: max and value.

The max attribute specifies total work required by the task. It must have a positive value (the default value is 1):

Example
<p>Ice cream devoured:</p>
<progress value="10" max="50"></progress>

The value attribute specifies how much of the task is completed. It must have a positive value that does not exceed max (or 1, if max is not specified):

Example
<p>Slushies slurped:</p>
<progress value="30" max="100"></progress>

Determinate or Not?

In the example below, you can see two HTML5 progress bars:

Example
<p>Fridge emptied:</p>
<progress value="30" max="100"></progress>

<p>Belly filled:</p>
<progress max="100"></progress>

The first one is determinate: it has the value specified and therefore shows the level of completion of the task.

The second bar has no value defined, which makes it indeterminate. That means it will only indicate that the action is still happening. However, it will not represent what part of it is completed and how much is still left to do.

Browser support

Browser image
Chrome
6+
Browser image
Edge
All
Browser image
Firefox
6+
Browser image
IE
10+
Browser image
Opera
11+
Browser image
Safari
6+

Mobile browser support

Browser image
Chrome
All
Browser image
Firefox
6+
Browser image
Opera
11+
Browser image
Safari
7+