Posts in current category

HTML5 <output> tag

May 03, 2021 17:00 HTML5

Table of contents

HTML5 labels are used to define different types of output. Please refer to the following example:

The results of the calculation are displayed in the element of the .lt;output:

<form oninput="x.value=parseInt(a.value)+parseInt(b.value)">0
  <input type="range" id="a" value="50">100
  +<input type="number" id="b" value="50">
  =<output name="x" for="a b"></output>

Try it out . . .

Browser support

HTML5 <output> tag HTML5 <output> tag HTML5 <output> tag HTML5 <output> tag HTML5 <output> tag

Firefox, Opera, Chrome, and Safari all support the hashtag.

Note: The Internet Explorer browser does not support the label.

Label definition and instructions for use

The label is displayed as the output of the calculation (e.g. the output of the execution script).

The difference between HTML 4.01 and HTML5

The label is the new label in HTML 5.


New: HTML5 new property.

Property Value Describe
for New element_id Describes the relationship between the elements used in the calculation and the results of the calculation.
form New form_id Define one or more forms to which the input field belongs.
name New name Defines the unique name of the object (used when the form is submitted).

Global properties

The label supports global properties and views the full property sheet HTML global properties.

The event property

The label supports all HTML event properties.

As described above, please familiarize yourself with the use of the HTML5 and output tags by using the label properties described in this article!