Question on CSS grid

Trying to figure out why there’s no gap added between 's inside of ?
Please see my example code here:

As soon as these two tags are located inside of , no gap is added.
By removing the a gap is automatically added.

Have tried to understand the MDN documentation of but cannot find anything useful or obvious to why grid won’t be applied for grid.

Please help me to understand this, thanks!