GMOD Lua Close DHtml

Hello, i wonder how i can close a DHTML lua client side script.

I have tried with:

html:SetVisible ( false )

But is that the same as close? Or is it just setting it invisible?

No, SetVisible just hides the panel and its children.
Remove will actually mark the panel, and children,for deletion.

As MCD says, Remove is the way to do it. Example:

And useful console command for removing all VGUI, clearvgui: