This is a beginner-friendly Python project that generates an HTML file (index.html
) with a heading and a paragraph, optionally styled with user-defined colors. The script runs in the terminal and interacts with the user to collect input before generating the final HTML content.
- Generate HTML structure with
<h1>
and<p>
tags - Optional color styling for both heading and paragraph
- Uses default content if nothing is entered
- Interactive Command Line Interface (CLI)
- Fully reusable and customizable
- Written in pure Python (no external libraries required)
File Name | Description |
---|---|
html_generator.py |
The main Python script |
index.html |
Output file generated based on user input |
README.md |
Documentation for the project |
- Python 3.x
- Works on Windows, macOS, and Linux
- No external dependencies needed
- Clone this repository
git clone https://github.com/your-username/html-generator.git cd html-generator