Ask coding questions

← Back to all posts
Is There A Way To Run HTML In Python Code.
BenJones12 (0)

Im Trying To Learn HTML To Make Better GUI's. Is There Any Way To Make Python Run A HTML File Or Code In The Console.(Without Taking It To A Webpage/External System) Thanks.

InvisibleOne (3200)

Unless you make it a webpage using Flask or Django, there isn't really a way to run HTML in the console

VulcanWM (2876)

Yeah it’s pretty easy

from flask import Flask
app = Flask('app')

def hello_world():
  return '<p>Hello there!</p>''', port=8080)