Thanks for the reply and letting me know that you have connected the printer to your computer over a USB.
But, I am still unable to understand what you mean by unable to print online.
Do you mean to say that you are unable to print websites or email from your browser?
If so, which browser are you using?
Have you tried different browsers?
When you say you are able to print offline, do you mean to say that you are able to print locally saved files on your computer?
Request you to provide more information for better assistance.
Recommend you do a clean uninstall of the printer by following the procedure mentioned below and install it back.
- Uninstall the printer from "programs and features" which can be accessed by doing a right-click on the Windows button (Please have the printer Off and disconnected during uninstallation.)
- Check in device manager, if the printer is listed there, please delete it. (Right click on the Windows button to access device manager)
- Go to devices and printers, select any printer listed there and you will get some options on the top.
- Click on print server properties.
- You will get a popup, click on the drivers tab and delete all the HP printer drivers listed there, if any.
- Delete all the instances of your printer listed in devices and printers.
- Restart the PC.
- Once the PC is on the desktop, press Win + R, it would bring a Run dialog box,
- Type %temp% in the run box and click Ok or hit the Enter button.
- It would bring up the temporary files folder. Delete the files in the folder (You might not be able to delete all the files, ignore them).
- If possible, delete the printer from the registries using Regedit or using any other 3rd party application.
- Restart the PC again.
- Download the latest full feature driver from www.hp.com/drivers and install it on the computer.
- Power On/Connect the printer to your computer only when the setup prompts for the printer.
Let me know if this helped.