Displaying Information to the User

As well as accepting input from users, sometimes displaying information back to users is helpful, perhaps to show their progress through filling out a long form or the results of a measurement. A new set of elements defined in HTML5 is aimed at exactly that purpose.

progress

Progress bars show movement toward a set goal and are commonly used in operating systems and on the Web, such as when loading data into a web application or installing software. The progress element gives you a standardized method for implementing progress bars in your own pages. In its simplest form, it shows progress between 0 and 1, using the value attribute to show the current position:

<progress value="0.5">0.5</progress>

Although ...

Get The Modern Web now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.