Pretty much.
For HDMI, you should most likely look for those certified by HDMI Org. They will usually have a QRC code and are tagged as such.
Always look for known brands. Monoprice, for example is a good option, here. But perhaps not some random product you find on Amazon for $5 cheaper.
That being said, HDMI is also very sensitive to the run length, and at a certain point you need to consider a hybrid HDMI cable and perhaps a voltage inserter to assist powering the cable. That is for longer runs.
Optical cables, or Toslink, are fiber optic. There should be no major concern with these except for how you use and handle them. These cables are sensitive to being bent to tight which can break the fiber, thus rendering the cable useless.
None of these particularly require a very expensive purchase (except for long HDMI runs), but shopping smart and buying a known brand could save you time and heartache as opposed to looking for the absolute cheapest cable on Amazon or at Best Buy.
Similar to Speaker Cables... ALWAYS avoid the same companies that proscribe magical results with their products. Fraudioquest and all the other specialty companies preying on the Audiophool sell very expensive cables that, just like the Speaker wire, don't do sh!t.