+ 1

How to add python code in HTML

I tried <py-script><\py-script> but it does not work It should be able to print

15th May 2025, 12:00 PM
Mikhael
Mikhael - avatar
3 Respostas
15th May 2025, 3:23 PM
Gulshan Mahawar
Gulshan Mahawar - avatar
+ 3
You mean as just plain text or maybe syntax highlighting, or do you mean executable code?
15th May 2025, 12:06 PM
Afnan Irtesum Chowdhury
Afnan Irtesum Chowdhury - avatar
+ 3
To run Python in HTML, use PyScript, but you must include the PyScript library first for eg:- https://sololearn.com/compiler-playground/WNG84XHfO0A3/?ref=app
15th May 2025, 2:47 PM
Alhaaz
Alhaaz - avatar
OSZAR »