HTML5 Output Example

Overview

Output

The <output> element should be used to display the results of a calculation. Note that not all browsers support this element. In this example, I am using JavaScript to display the results of a simple calculation.

View the source code of this page to better understand how this element is used. Don't forget to try this page in multiple browsers.

Works in modern versions of Chrome (but not Safari), Firefox, and Opera. Doesn't work in Internet Explorer 9.

Example <output>

First Value:

Second Value:

Result of addition:

In this example, one enters values and JavaScript is used to calculate the results. Since the <output> element is used to display the results, some browsers may ignore that element and you may not see the results .