I have some SVG elements grouped together in a element. I just want to style that element to show grouping of elements. Like I want
You cannot add style to an SVG element. Its only purpose is to group children. That means, too, that style attributes you give to it are given down to its children, so a fill="green" on the means an automatic fill="green" on its child (as long as it has no own fill specification).
Your only option is to add a new to the SVG and place it accordingly to match the children's dimensions.