I'm just wondering if there is a way to put a python Tkinter canvas onto a web page with HTML. It's OK if there isn't. If there is not, is there a way to run python code from IDLE with HTML?
Essentially 'no'.  Tkinter is Python's interface to the tcl/tk GUI framework.  The 'tkinter canvas' is actually the tk Canvas.  A web page could only have a tk Canvas if the browser were somehow running tcl/tk.
As for running Python code in a browser, there are some browser add-ins that will allow that.  I do not know how good they are not.  You should search the web for 'run python in browser' or add a separate question here.  It is irrelevant how you edit the python code, whether with IDLE or another editor.
Is there a way to embed a tkinter canvas into an HTML web page?