Basically yes, photons and gluons are massless because they do not interact with the Higgs field. To why is that, I have to say I don’t know. I’ve tried to find out but I didn’t understand. I think this have something to do with gauge invariance, but then you could ask what gauge invanriance is, and I don’t know!
Would some physicist try to explain to us why photons and gluons are massless (in a way even I can understand)?
I will just copy&paste from this Quantum Diaries post (because it’s well outside my field of expertise):
[The Higgs mechanism] is a mathematical description of a physical entity, the “Higgs field” that permeates all space, just like a gravitational field affects the space around a massive object. Although we cannot see this field, particles feel its effects by acquiring a mass, just like we feel the gravitational attraction du to the Earth’s field.
The Higgs field is what is needed to provide mass to all elementary particles such as the electrons, the quarks, the W and Z bosons. The fact that we have found the W and Z bosons with exactly the mass predicted by the theory is a strong indication that the Higgs mechanism takes place and the Higgs field exists, but there is of course no guarantee until we find the Higgs boson to prove it all.
The Higgs boson is just an excitation of the Higgs field. Ok, I admit, this one is harder to swallow. But think of a hydrogen atom. In its ground state, the hydrogen atom lives eternally. It will never decay into anything more stable. But it becomes “excited” after absorbing energy. Its electron then jumps to a higher level making the atom unstable. In just picoseconds (millionth of millionth of a second), the hydrogen atom will come back to its ground state by emitting a photon, spitting back the excess energy to return to its stable state.
The Higgs field, like a hydrogen atom, can be excited, also only in discrete values of energy corresponding to the Higgs boson mass. The energy released when protons collide in the Large Hadron Collider can excite the Higgs field. The excited state is just the Higgs boson itself. And just like the hydrogen atom in its excited state, it will try to return to its ground state. The Higgs boson is therefore very unstable and will decay into other particles instants after appearing.