Deprecated in HTML5. Do not use.

<script for="">

Disclosure: Your support helps keep the site running! We earn a referral fee for some of the services we recommend on this page. Learn more
Attribute of
<script> HTML Tag

The for attribute of <script> was only supported by Internet Explorer, and is therefore non-standard. We do not recommend its use, because your code will not validate and likely will not function as you intended.

Claire is seasoned technical writer, editor, and HTML enthusiast. She writes for HTML.com and runs a content agency, Red Robot Media.