Html5 output Tag

The <output> tag is new in HTML5.The output tag is mainly used to calculate the result example add,subtract,division and multiplication through form.

Example Code

<!DOCTYPE HTML>
<form name="frm_calculate" id="frm_calculate">
  <input name="number_1" id="number_1" type="number"> +
  <input name="number_2" id="number_2" type="number"> =
  <output name="fin_result" onforminput="value=number_1.valueAsNumber + number_2.valueAsNumber"></output>
  <input type="submit" value="Calculate" />
</form>

Out Put :




+ =

In the above form is use to add two number.The Number get to add from number1 and number2 text box finally a output will display through output tag.

Screen Shot

+ =




Content