This Java program converts a text file into an HTML file.
The Main class in this project takes input from a text file and generates an HTML file with the same content. It adds basic styling to the HTML file and includes the filename as a heading.
- Input File: Provide the path or filename of the text file you want to convert when prompted.
- Output File: The program generates an HTML file with the same name as the input file but with the
.htmlextension.
- Java Development Kit (JDK) installed on your system.
- Eclipse IDE (or any Java IDE) for development.
- Clone this repository to your local machine.
- Open the project in your preferred Java IDE.
- Compile and run the
Mainclass. - Follow the instructions to input the filename or path.
Suppose you have a text file named example.txt with the following content:
Hello, world!
This is a sample text file.
Running the program with example.txt as input will generate example.html containing the HTML representation of the text.
Gauresh
This project is licensed under the MIT License.