The visibility attribute lets you control the visibility of graphical elements. With a value of hidden or collapse the current graphics element is invisible.
Note: If the visibility attribute is set to hidden on a text element, then the text is invisible but still takes up space in text layout calculations.
Depending on the value of attribute pointer-events, graphics elements which have their visibility attribute set to hidden still might receive events.
Note: As a presentation attribute, visibility can be used as a CSS property. See the CSS visibility property for more information.
You can use this attribute with the following SVG elements:
This value indicates that the element will be painted.
hidden
This value indicates that the element will not be painted. Though it is still part of the rendering tree, i.e. it may receive pointer events depending on the pointer-events attribute, may receive focus depending on the tabindex attribute, contributes to bounding box calculations and clipping paths, and does affect text layout.