Formatting a HTC phone is not possible if you refer to the format action itself. Instead, you will need to perform a factory reset which will bring your phone to the state where it was released by the manufacturer. The factory reset can be performed in 2 ways: by using the settings you can find in your phone or by entering the recovery menu. I will provide both ways for your pleasure but keep in mind that performing a factory reset will erase your files, phone contacts, other media and so on.
Using the built-in settings
- Press HOME > MENU, and then tap Settings > Security > Factory data reset.
- Press accept and wait for the phone to restart and you'll have the state of the phone just like it was when you bought it.
Using the Recovery menu
Turn off the phone and press these buttons HOME + END CALL/POWER + BACK
Then the reset process will start. When it finishes, press Menu