<output>

Description

The output element represents the result of a calculation.

Example


<!DOCTYPE HTML>
<html>
<body>
   <form onsubmit="return false"
      oninput="res.value = quant.valueAsNumber * price.valueAsNumber">
      <fieldset>
            <legend>Price Calculator</legend>
            <input type="number" 
                   placeholder="Quantity" 
                   id="quant" 
                   name="quant" />
            x <!--  w w  w. j  ava  2  s.  c  o m-->
            <input type="number" 
                   placeholder="Price" 
                   id="price" 
                   name="price" />
            =
            <output for="quant name" name="res" />
      </fieldset>
   </form>
</body>
</html> 

Click to view the demo

The code above generates the following result.

output




















Home »
  HTML CSS »
    HTML CSS Reference »




HTML Tag Reference
CSS Reference
CSS Selector Reference
Encoding Reference