HTML <output> Attributes

HTML <output> for Attribute Perform a calculation and show the result in an <output> element: <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> </form> Try it Yourself » Definition and Usage The for attribute specifies the relationship between the result of the calculation, and the elements used in the calculation. HTML <output> form Attribute An <output> element located outside a form (but […]

HTML <output> Tag

Example Perform a calculation and show the result in an <output> element: <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> </form> Try it Yourself » Definition and Usage The <output> tag represents the result of a calculation (like one performed by a script). Browser Support The numbers in the table specify the first browser version that fully supports […]

HTML <data> Tag

Example The following example displays product names but also associates each name with a product number: <ul> <li><data value=”21053″>Cherry Tomato</data></li> <li><data value=”21054″>Beef Tomato</data></li> <li><data value=”21055″>Snack Tomato</data></li> </ul> Try it Yourself » Definition and Usage The <data> tag links the given content with a machine-readable translation. This element provides both a machine-readable value for data processors, and a human-readable […]