First of all, I'm a beginner. I have created a simple website using HTML and CSS, I have a python project calculator that I want to add it to my website....can someone tell me how do I connect those two files.
I'm using VS Code as my text editor
First of all, I'm a beginner. I have created a simple website using HTML and CSS, I have a python project calculator that I want to add it to my website....can someone tell me how do I connect those two files.
I'm using VS Code as my text editor
For that, you need to use python frameworks like:
1. Flask: Flask is a popular, extensible web micro-framework for building web applications with Python.
2. Django: Django is a Python-based free and open-source web framework, which follows the model-template-view architectural pattern.
First of all, I think you are confusing the JavaScript and python in terms of usage. If you want your web application to perform some task then you use JavaScript and its functions on client side.
But if you really want to use Python then you would need a framework. Django and Flask are two options you can consider as a beginner. Both of these basically provides you with a structure where you can put the usual HTML, CSS, JavaScript and as well as Python. Using these is a cleaner way, although you can still add a Python script in a webpage (check this) but it can complicate things in case of large projects.
According to me you should use Django framework for creating a website through html and css which basically means you are working on front end. Django is an easy framework for beginners as compared to Flask. For instance you can go to this link for getting started: https://www.djangoproject.com/start/