Your Web News in One Place

Help Webnuz

Referal links:

Sign up for GreenGeeks web hosting
January 5, 2021 02:23 pm GMT

The HTML Tag

Welcome to the first article in the Uncommon HTML Tags series!
With each article in this series, I will introduce a widely unknown HTML tag, discuss compatibility across browsers and cover some real-world use cases with the element.

My hope is that each article broadens your understanding of HTML and helps you discover new tags.

The < progress > Tag

The <progress></progress> tag will create a progress bar and allow you to visualize the completion of a task. This could be handy for showing the progress completion of a multi-page feedback survey, for example!

Let's take a look at how it's used!

<label for="progress">Article Progress:</label><progress id="progress" max="100" value="50"> 50% </progress>
Enter fullscreen mode Exit fullscreen mode

Screen Shot 2021-01-04 at 9.55.45 AM.png

As seen in the example above, there are two attributes you can use on the element.

  1. max - this attribute, if used, is a floating point number and must have a value greater than 0.
  2. value - this optional attribute is used to determine the completion of a task and must be a floating point number between 0 and the number set in the max attribute. If the value attribute is omitted, the progress bar is set to an indeterminate state.

Here is an example of an indeterminate progress bar:

<label for="progress">Article Progress:</label><progress id="progress" max="100"></progress>
Enter fullscreen mode Exit fullscreen mode

Indeterminate Progress Bar

If you want to play around with the tag, feel free to fork the pen below!

Compatibility

The <progress></progress> tag is part of the HTML5 Standard and is supported on all major web browsers. No need to worry about compatibility issues!

Screen Shot 2021-01-04 at 9.53.29 AM.png

Conclusion

Thanks for reading! Have you ever used the <progress></progress> tag in a project? Let me know in the comments below!

If you liked this article and want more content like this, read some of my other articles , subscribe to my newsletter and make sure to follow me on Twitter!


Original Link: https://dev.to/braydoncoyer/the-progress-html-tag-2pk0

Share this article:    Share on Facebook
View Full Article

Dev To

An online community for sharing and discovering great ideas, having debates, and making friends

More About this Source Visit Dev To