0
Can we use python inside html for web development.?
Just like we can use script tag for javascript or php tags.
4 odpowiedzi
+ 3
From search :
many more example you can find from search..
https://www.sololearn.com/discuss/2140594/?ref=app
https://www.sololearn.com/discuss/3106304/?ref=app
https://code.sololearn.com/W830NWRa5H3m/?ref=app
https://code.sololearn.com/W9H34YP3AChp/?ref=app
https://code.sololearn.com/WjUXvYBzGJCA/?ref=app
https://code.sololearn.com/WMNQJavL7jKP/?ref=app
https://code.sololearn.com/WfQHRGcuY6Pm/?ref=app
+ 2
Yes, it is possible to use Python in web development, although it is not as common as using languages such as JavaScript or PHP.
One way to use Python in web development is by using a Python web framework such as Django or Flask. These frameworks provide libraries and tools that make it easier to build web applications using Python. They allow you to define the layout and functionality of your web application using Python code, and can generate HTML, CSS, and JavaScript on the fly to render the web page in a web browser.
You can also use a server-side language such as Python to generate HTML, CSS, and JavaScript code that is then sent to the client's web browser. This can be done using a templating language, such as Jinja, which allows you to embed Python code in HTML files.
It is not possible to include Python code directly in an HTML file in the same way that you can include JavaScript or PHP code. However, you can use the script element to include the output of a Python script in an HTML file.
0
It's possible to run some Python codes directly from frontend web with a JavaScript library called Pyscript.
https://code.sololearn.com/W975c25QxC8n/?ref=app
https://code.sololearn.com/Wq4uq3d5Jv9U/?ref=app
Read more https://pyscript.net/examples/