How to Connect HP Deskjet 3510 to Wi-Fi?
HP Deskjet may be wired or wireless. Wireless printers give you more freedom because you do not need to attach your computer with the Wi-Fi source. It is not necessary to remain within the same room; you can move around with your laptop quickly. Whereas in wired printers, there should be a wired connection with Wi-Fi source so that the distance from the Wi-Fi source matters.
Step by step method
If you have bought a new printer, then start unpacking it and connecting it with the power source; now install the Ink cartridges and load the paper and the input tray. If it is a wired printer, then connect the printer with your computer or laptop, and if it is a wireless connection, you need to install the driver on your computer.

Tips for a better connection
To have a better connection of the printer with a Wi-Fi source, keep in mind the following things:

That's it for today. After connecting it to WiFi, if you find that the printer is encountering issues, like hp officejet 3830 not printing, check out the linked guide for troubleshooting.
Adios!