HTML5 Meter Element Progress Bar Tutorial

HTML5 Meter Element Progress Bar Tutorial

HTML5 Meter Element Progress Bar Tutorial

HTML5 brought with it many great features to front-end work on the internet in HTML, and today, we continue on from yesterday’s HTML5 Meter Element Primer Tutorial as shown below, we talk about one of the newly introduced, and very useful, elements called “<meter>”. By the way, the “<meter>” element does not work with mobile Safari, for instance, and you can read more about this here.

As we outlined yesterday, at its core the “<meter>” element represents a “fraction of one” or perhaps you can think this as a “percentage of one hundred”, and, as you’d guess, a generic “xth of y for the fraction x/y” idea … where “y” could be your “max” parameter, and perhaps your “min” parameter is zero. Today we extend that “fraction” concept to being a “fraction” of completion time, as a progress bar.

Progress bars appear all over the internet. Personally I love the ones that go backwards, just like those mileposts that increase as you head closer to a town. In defense of this occasional progress bar behaviour, it can be quite hard to predict when some jobs will finish … suppose you base it on a file size … but this may not take into account record sizes or intensity of calculation for particular data record types etcetera etcetera etcetera.

With our progress bar today we analyze the pixels of a user-defined image file and show a few of the most commonly occurring pixel colours appearing in that image (file) and present this as a (Google Chart) bar chart, that changes along with the progress bar “progressing”.

So take a look at the PHP code in image_bargraph.php, or a live run, for your perusal. A useful PHP link for this was this one … so, thanks. Hope it helps with a project idea you are mulling over now.

Stop Press: The next tutorial in our sequence called HTML5 Meter Element Word Count Tutorial led to some thinking causing changes to our code above which you can see with the image_bargraph.php link.


Previous relevant HTML5 Meter Element Primer Tutorial is shown below.

HTML5 Meter Element Primer Tutorial

HTML5 Meter Element Primer Tutorial

HTML5 brought with it many great features to front-end work on the internet in HTML, and today we talk about one of the newly introduced, and very useful, elements called “<meter>”.

At its core the “<meter>” element represents a “fraction of one” or perhaps you can think this as a “percentage of one hundred”, and, as you’d guess, a generic “xth of y for the fraction x/y” idea … where “y” could be your “max” parameter, and perhaps your “min” parameter is zero.

This element is useful to represent a numerical concept graphically (like a ratio), something we do today with …

  • simulation of a stopwatch … with its seconds, minutes, hours, days, years elapsed
  • a fraction as (numerator) x / y (denominator)

Tomorrow we’ll show you a very commonplace usage for “<meter>” as a “progress bar” which you see so much of on the internet, when you are waiting for something.

So take a look at the HTML code in meter.html, or a live run, for your perusal. Hope it helps with an HTML project you are on now.

If this was interesting you may be interested in this too.


If this was interesting you may be interested in this too.

This entry was posted in eLearning, GUI, Tutorials and tagged , , , , , , , , , , , , , , , . Bookmark the permalink.

25 Responses to HTML5 Meter Element Progress Bar Tutorial

  1. There is noticeably a bundle to know about this. I suppose you have created specific nice points in functions also.

  2. Yasmin Julia says:

    Hello, you used to write great, but the last several posts have been kinda boringΒ‘K I miss your great writings. Past few posts are just a bit out of track! come on!

  3. Antone Poor says:

    Soon after reading this I believe is really informative , i appreciate your time and effort to write this posts.

  4. I am also writing to make you understand of the amazing encounter my wife’s girl encountered viewing your site. She learned such a lot of issues, most notably how it is like to possess an incredible coaching spirit to let most people just know selected grueling things. You actually surpassed my expectations. Thanks for showing the invaluable, dependable, edifying and in addition easy tips on the topic to Kate.

  5. I would like to thank you for the efforts you’ve put in writing this site. I’m hoping the same high-grade blog post from you in the upcoming also. In fact your creative writing abilities has encouraged me to get my own web site now. Actually the blogging is spreading its wings fast. Your write up is a good example of it.

  6. Yasmin Julia says:

    Wow! This could be one particular of the most useful blogs We’ve ever arrive across on this subject. Actually Fantastic. I’m also an expert in this topic therefore I can understand your effort.

  7. health says:

    Anyways thanks for your ideas. I appreciate it. Please make even more articles related to this

  8. diy articles says:

    Anyways thanks for your concepts. I appreciate it. Please make more posts related to this

  9. I‘¦ve recently started a web site, the information you provide on this website has helped me greatly. Thanks for all of your time & work.

  10. dealership says:

    Great beat ! I wish to apprentice while you amend your website, how could i subscribe for a blog site? The account aided me a acceptable deal. I had been a little bit acquainted of this your broadcast offered bright clear concept

  11. automation says:

    topics as well as share it with us. I think it will assist a bunch of some people. Thanks

  12. skincare says:

    I’m entirely concur with your claim or the things that you have actually discussed below in this web site.

  13. Truly it is very useful post and that i decide on to read these techniques and in addition I will likely be having a go and numerous thanks sharing such kind of techniques please ensure that it stays sharing.

  14. hello!,I like your writing so so much! share we be in contact more about your article on AOL? I need an expert on this house to solve my problem. Maybe that’s you! Having a look ahead to peer you.

  15. I am now not certain where you are getting your information, however good topic. I must spend some time learning much more or understanding more. Thank you for great info I was looking for this information for my mission.

  16. Wow! Thank you! I permanently needed to write on my blog something like that. Can I take a portion of your post to my site?

  17. Solicitor says:

    I’m still learning from you, while I’m trying to achieve my goals. I definitely enjoy reading everything that is posted on your website.Keep the aarticles coming. I liked it!

  18. Yes I Do says:

    I want to get across my gratitude for your kind-heartedness giving support to those people who should have assistance with this important subject matter. Your very own dedication to getting the solution throughout was amazingly beneficial and have frequently made others much like me to attain their goals. Your personal helpful guide implies much a person like me and a whole lot more to my colleagues. Thanks a ton; from all of us.

  19. Thanks a bunch for sharing this with all folks you actually understand what you are talking approximately! Bookmarked. Kindly additionally visit my web site =). We will have a link trade agreement between us!

  20. I would like to show my thanks to the writer just for rescuing me from this particular setting. As a result of browsing throughout the internet and meeting proposals which are not pleasant, I was thinking my entire life was over. Being alive devoid of the solutions to the difficulties you have sorted out by way of your good short article is a critical case, and the kind that might have adversely damaged my career if I had not come across your website. Your primary expertise and kindness in controlling a lot of stuff was precious. I am not sure what I would’ve done if I hadn’t encountered such a subject like this. I am able to at this time look ahead to my future. Thanks so much for this professional and sensible guide. I will not be reluctant to suggest your web blog to any person who needs to have counselling about this topic.

  21. cooking says:

    You completed a few nice points there. I did a search on the subject matter and found most folks will consent with your blog.

  22. Shag Carpet says:

    Hiya, I’m really glad I have found this information. Nowadays bloggers publish just about gossips and web and this is really frustrating. A good site with exciting content, that is what I need. Thank you for keeping this site, I’ll be visiting it. Do you do newsletters? Cant find it.

  23. Jim Cabada says:

    Rattling good info can be found on web site. “The only thing you take with you when you’re gone is what you leave behind.” by John Allston.

  24. Merely a smiling visitor here to share the love (:, btw outstanding style. “Justice is always violent to the party offending, for every man is innocent in his own eyes.” by Daniel Defoe.

  25. I do trust all of the concepts you’ve introduced in your post. They are very convincing and will definitely work. Nonetheless, the posts are too brief for novices. May you please extend them a bit from next time? Thanks for the post.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>