6
I wonder what the tag is for <output>
.
I saw this example here on the Internet:
<form onsubmit="return false" oninput="o.value = a.valueAsNumber + b.valueAsNumber">
<input name="a" type="number" step="any"> +
<input name="b" type="number" step="any"> =
<output name="o" for="a b"></output>
</form>
Looking at the above example, I realized that this property value
is something that does not exist in the other elements normally. Usually, you have the property value
in the input
, but it’s interesting to see that on the tag output
also has.
I wanted to understand a little more about it to know if I can use it in my day to day.
- What is the purpose of this tag?
- What’s the difference of writing a value to a tag
<output>
for other tags? That is, it was not enough just to useinnerText
?
Observing: Even I saw that the site has a question on the subject, but there is no answer about the purpose of the tag.
Read carefully: Some questions, however simple they may seem, are asked by me to help add content [in our native language] to the site.
– Wallace Maxters
Wallace you got the html dictionary today? :D
– hugocsl
@hugocsl yes
– Wallace Maxters
Let’s alphabetize the SOPT
– Wallace Maxters
I liked the initiative, the Ctrl+C Ctrl+V guys need to see the basics
– hugocsl