You should not have any problems formatting and reinstalling Win98. To make sure all of your hardware is supported you could check microsoft's HCL(hardware compatability list) and see if your model is listed for Win98.
Check HP's website for the bios key (I think it is F1). Some of those HP's have a restore partition. If you go to HP's website and download the manual it will tell you if it has a restore partition, how to access it, and how to reinstall factory settings. The manual should also tell you the key that will get you into the bios.
Also, while it is booting and you see the HP splash screen, hit the ESC key. It may make the splash screen disappear (I'm not totally sure on this, I can't remember). If it does, look at the bottom of your screen for the bios key.
Good Luck.