Based on your description of your problem, my educated guess is that you have a problem with the system board or motherboard. Checking Compaq support site, it says that beeps are generally heard when a hardware device is not connected properly or has failed.
First thing to try is disconnect the keybaord and mouse and try to start the computer again. What we are trying to do is find out which hardware device might be involved. So start with the keyboard an mouse. If the computer still does not start, remove any periferal drives, like floppy or cd drives.
There are several beep codes, below are a few examples listed:
Beep codes common to HP and Compaq Desktop PCs
The following beep codes are common to many HP and Compaq desktop computers. Use these codes first before referring to the other code lists.
Not all codes are shown.
1 short beep and 1 long beep
2 short beeps and 1 long beep (repeats 5 times)
Unable to initialize video or video card required but not installed
3 short beeps and 1 long beep
CPU configuration error or CPU type is not compatible
The following beep codes are common to many HP and Compaq desktop computers that can occur while restoring, flashing or updating the BIOS
1 short beep
Legacy floppy drive or CD/DVD drive not detected
2 short beeps
Floppy diskette or compact disc not detected
3 short beeps
Unable to start flashing (such as when missing a utility or BIOS image)
4 short beeps
Flashing failed (checksum error, corrupted image, etc.)
5 short beeps
BIOS recovery successful
Try working on this solution and see if you can get the computer to start. Below is a link to a troubleshooting page from Compaq for your computer. This can be a good reference as well.
I hope that this information was helpful.