Hi, thank you for contacting JustAnswer.com. My name is Russell. I will do my best to provide the right answer to your question.
Ink cartridges are made to be specific to their printers of intended usage, in more ways than one.
First there's the shape of the cartridge case or outer shell... that is quite specific.
Second, there's the composition of the ink inside. Different cartridges do in fact have different ink formulations, depending upon the usage the printer will put the ink to, the size of the 'nozzles' or pores through which the ink will be forced, etc.
Third, there's the electronics inside the ink cartridge. There are, as you may have observed, electrical contacts - usually copper-colored - on the cartridge, that fit to corresponding contacts in the printer's carriage. Those contacts have to fit the corresponding contacts in the printer, for the cartridge to work.
Also, in many cases, there is a 'recognition chip' inside the cartridge, which is queried by the printer and must answer back correctly, or the cartridge will be rejected by the printer.
So you usually cannot, at all, use the wrong cartridges in a given printer.
The notion of also using HP cartridges in a Canon printer, is very unlikely, along with all the other factors. I would advise not trying it.