I have been doing a lot of research and reading and I am still having trouble understanding how to accomplish my goal.
For reference I have been here reading:
Get to know the SharePoint REST service
I have a simple HTML file on my web-server named testfile.html that has this snippet
<!doctype html>
<html lang="en">
<head>
<title>The test SharePoint htlm page </title>
</head>
<body>
<input type="text" id="txttitle" >
<input type="submit" value="Submit">
</body>
</html>
I have a list on my SharePoint (2016) on-premise server called testdatalist and it has a URL looks like this:
https://sp.mycompany.com/Lists/testdatalist/AllItems.aspx
It has one column named Title.
I have seen samples using REST / JSON code showing how to add records, but I am not sure how to tie this all together because each example is ever so slightly different.
Simply put:
- Do I need to have my HTML file on the SharePoint server or Can I have it on it's own web-server?
- How can I enter something in the input box txttitle on the html page and when I press the Submit button have it save to the list?
OR
Does all this need to be done within SharePoint.... for example do I need to create a Blank SharePoint WikiPage the add my textbox and button and then add in script / content editors to do all the REST / JSON coding?

