div hidden but still showing up in source

I hid a div in a form using jquery hide element, it’s no longer visible on the page view, but it still shows up in source Why?

Because .hide() does not remove element, but hides it. Use .remove() if you want to remove element from the DOM tree.