how can we connect python and html, just like MySQL and python?

How can we connect html and python, just like python and MySQL by using mysql.connector command?

Need this for my project completion, did it in MySQL and python, but was wondering if we can do this also