DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Refcards Trend Reports Events Over 2 million developers have joined DZone. Join Today! Thanks for visiting DZone today,
Edit Profile Manage Email Subscriptions Moderation Admin Console How to Post to DZone Article Submission Guidelines
View Profile
Sign Out
Refcards
Trend Reports
Events
Zones
Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Partner Zones AWS Cloud
by AWS Developer Relations
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Partner Zones
AWS Cloud
by AWS Developer Relations
The Latest "Software Integration: The Intersection of APIs, Microservices, and Cloud-Based Systems" Trend Report
Get the report
  1. DZone
  2. Coding
  3. Languages
  4. Placate Impatient and Curious Users with HTML5 progress and meter Elements

Placate Impatient and Curious Users with HTML5 progress and meter Elements

John Esposito user avatar by
John Esposito
·
Jan. 04, 12 · Interview
Like (0)
Save
Tweet
Share
4.84K Views

Join the DZone community and get the full member experience.

Join For Free

HTML5 gives developers new powers, but also makes old tasks easier. Much debate among the standards-makers tries to define the fine line between 'convenient' and 'too particular', and 'a large set of reasonable use-cases' now functions as WHATWG's most important single criterion of feature acceptability (as the debate over the <time> element spotlighted, a bit starkly).

Two of the more particular, developer-conveniencing elements are <progress> and <meter>, which the spec describes as follows:

The progress element represents the completion progress of a task. The progress is either indeterminate, indicating that progress is being made but that it is not clear how much more work remains to be done before the task is complete (e.g. because the task is waiting for a remote host to respond), or the progress is a number in the range zero to a maximum, giving the fraction of work that has so far been completed.

The meter element represents a scalar measurement within a known range, or a fractional value; for example disk usage, the relevance of a query result, or the fraction of a voting population to have selected a particular candidate.

 
Both of these could be developed fairly easily using HTML4 tech, with some simple math (I remember building these in VB) -- but because they address so many different kinds of user experience (i.e., they have so many different use-cases), they proved useful enough to receive entrance into the standard.

The specs on both are fairly simple; read them (progress, meter) for the basics.

Both elements are heavily customizable, however, and especially if they appear frequently on your site, may need to be styled appropriately.

  • The <progress> element exhibits slightly more complex default behavior, depending on the browser-OS combination, so a heavily-exemplified discussion like 'Cross Browser HTML5 Progress Bars In Depth' should help a good deal. None of the code is difficult, and the results can serve many purposes -- so your ROI should be pretty high. Also includes links to recommended polyfills.
  • The behavior of the <meter> element is less intrinsically complex, but its uses are varied enough that strong familiarity will be important. html5doctor's 'Measure up with the meter tag' includes much less styling detail than the <progress> guide, but the focus remains where it probably should be, on marking up the metered data itself.

 

Update: for more pre-formatted CSS3 progress bars, see also this project on github.

HTML Element

Opinions expressed by DZone contributors are their own.

Popular on DZone

  • Microservices 101: Transactional Outbox and Inbox
  • Getting a Private SSL Certificate Free of Cost
  • A Beginner’s Guide To Styling CSS Forms
  • Using Swagger for Creating a PingFederate Admin API Java Wrapper

Comments

Partner Resources

X

ABOUT US

  • About DZone
  • Send feedback
  • Careers
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 600 Park Offices Drive
  • Suite 300
  • Durham, NC 27709
  • support@dzone.com
  • +1 (919) 678-0300

Let's be friends: