Is it possible to generate a white box in one quarter or half of a material's UV space

I am trying to learn how to manipulate texture coordinates and wrap my head around how they work, primarily in 2D space. I’ve seen circles created using no textures before, as well as other shapes for use in particle effects and UI elements, but I would like to create boxes like these:

I want to learn how to generate something like this without relying on imported textures. Can anyone point me in the right direction?