hide() Method


The hide() method is used to hide HTML elements.

It removes the element from view but does not delete it from the page.

The hidden element can be shown again using the show() method.

This hides the element immediately without animation.

This hides the element with animation duration in milliseconds.

You can also use predefined speed values such as slow or fast.

hide() Method Notes:

  • Hides elements visually
  • Accepts speed parameter
  • Does not remove element from DOM
  • Can be reversed using show()