Use the <progress> tag to create a progress bar in HTML. The HTML <progress> tag specifies a completion progress of a task. It is displayed as a progress bar. The value of progress bar can be manipulated by JavaScript.
The following are the attributes −
Attribute | Value | Description |
---|---|---|
max ![]() | max | It should have a value greater than zero and a valid floating point number |
value ![]() | value | Specifies how much of the task that has been completed. It should be a floating point number between 0 and max or 0 and 1 if max is omitted |
Example
You can try to run the following code to learn how to create a progress bar in a web page −
<!DOCTYPE html> <html> <head> <title>HTML Progress Tag</title> </head> <body> <h1>Loading</h1> <progress value = "65" max = "100"/> </body> </html>