Minimal example:
from pyfrontkit import div, HtmlDoc
# Create a full HTML document doc = HtmlDoc(title="Test Page")
# Create a simple div block div(ctn_p="Hello World").form("120px", "120px", "10px", "red", "white")
# Generate HTML and CSS files doc.create_document()
> The library automatically handles document structure (<!DOCTYPE html> to </body>), links CSS, and generates a class for the block.
Resulting HTML:
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Test Page</title> <link rel="stylesheet" href="style.css"> </head> <body> <div class="block-1"> <p>Hello World</p> </div> </body> </html>
CSS snippet:
.block-1 { width: 120px; height: 120px; background-color: red; color: white; border-radius: 10px; }
Links: GitHub: https://github.com/Edybrown/Pyfrontkit PyPI: https://pypi.org/project/pyfrontkit/