Shaders are not layout. I don't think there is an HTML/DOM analogy here that works. But if you had to force one, shaders are more like Javascript. It's a terrible analogy though.

Collisions aren't part of a graphics API.

> Collisions aren't part of a graphics API.

You can do occlusion queries though, which is a form of 2D collision detection similar to what home computer sprite hardware provided ;)