HTML5: How to specify how much of the task has been completed?

Go to Exercise page


HTML Code:

<!DOCTYPE html><!-- Define document type as HTML5 -->
<html><!-- Start of HTML document -->
<head><!-- Start of head section -->
<meta charset="utf-8"><!-- Define character encoding -->
<title>How to specify how much of the task has been completed</title><!-- Title of the document -->
</head><!-- End of head section -->
<body><!-- Start of body section -->
Downloading progress: <!-- Text indicating the purpose of the progress element -->
<progress value="50" max="100"><!-- Define a progress element with value and maximum attributes -->
</progress><!-- End of progress element -->
</body><!-- End of body section -->
</html><!-- End of HTML document -->


  • This HTML code demonstrates how to specify the completion progress of a task using the <progress> element.
  • The <progress> element is used to indicate the completion progress of a task.
  • Inside the <progress> element, the value attribute specifies the current progress value, which in this case is set to 50, indicating that 50% of the task has been completed.
  • The max attribute specifies the maximum value of the progress, representing the total amount of work required for the task, which in this case is set to 100.
  • The text "Downloading progress:" before the <progress> element provides a description or context for the progress indicator.

Live Demo:

See the Pen progress-value-answer by w3resource (@w3resource) on CodePen.

See the solution in the browser

Supported browser

Firefox logo Chrome logo Opera logo Safari logo Internet Explorer logo
Yes Yes Yes Yes Yes


Go to Exercise page

What is the difficulty level of this exercise?

Test your Programming skills with w3resource's quiz.

Follow us on Facebook and Twitter for latest update.