Should all input fields and types always be wrapped within the form element?

When creating a form element, does all input fields and types, always need to be wrapped within the form’s opening and closing tags or will some of them work outside the form element, since they are input tags afterall?

https://www.codecademy.com/paths/web-development/tracks/learn-html-web-dev-path/modules/learn-html-forms/lessons/html-forms/exercises/textarea-element

Only those form controls within the FORM element will have their values sent up to the server on Submit. Any controls outside of the FORM will still work as expected but we will need to process them locally with script.

Okay.

Could you kindly write a code example of such scenarios where an input element outside of a FORM will have to be processed locally with a script? Thanks.

https://repl.it/@mtf/input-and-script-access

Click Run, type in the field and press Enter.