Summary -

In this topic, we described about the <output> tag along with detailed example.

The <output> tag was introduced in HTML 5. Displays the Result of the calculation or user action. The <output> tag is used for representing the result of a calculation or a user action.

The tag can be specified like <output for="" name=""></output>. Any textual content in <output> tag will define its initial value.

Syntax -


Optional Attributes -

forSpecifies the relationship between the results of calculation. Element_id
formSpecifies output element associated forms Form_id
nameSpecifies the output nameText
Note! <output> tag is not supported by internet explorer.

Example -

<!DOCTYPE html>
		<title>Option tag example.. </title>
		<p> Ordered list: </p>
			<input type="range" id="a">
			+<input type="number" id="b">
			=<output name="x" for="a b"></output>

Output -

Note! The meter element is not supported in Edge 12 or Internet Explorer previous versions.