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>
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
Coursera
Pros
  • Professional service
  • Flexible timetables
  • A variety of features to choose from
Main Features
  • Professional certificates of completion
  • University-level courses
  • Multiple Online degree programs
Datacamp
Pros
  • Great user experience
  • Offers quality content
  • Very transparent with their pricing
Main Features
  • Free certificates of completion
  • Focused on data science skills
  • Flexible learning timetable

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+

Latest Udacity Coupon Found:

Verified STAFF PICK

75% OFF COURSES

Udacity Black Friday Offer

The best time to save on Udacity courses is now - follow this coupon to access a 75% Udacity Black Friday discount & enjoy learning at a very low cost!

Expiration date: 28/02/2021
3176 People Used
Only 97 Left
Rating
5.0