Using the `for` Attribute on the `output` Element in HTML5

There are two things here that you’re probably already aware of. First, HTML includes an element that allows you to display the “result of a calculation”. It’s a form element and it’s been around for some time, having been added in HTML5.
The other thing you’re likely to be aware of is that the for attribute is normally used on the <label> element to associate a <label> with a form element. This aids accessibility and usability, as you’ve probably discovered as both a developer and a user. But interestingly, the for attribute can also be used on the <output> element:

Link: https://www.impressivewebs.com/using-for-attribute-output-element-html5/