46. What is the difference between hidden and display:none?
The hidden HTML attribute indicates that an element is not currently relevant and should not be presented. CSS display:none also removes an element from normal visual layout. The mechanisms differ in semantics and CSS interaction, and the hidden state can be overridden by CSS rules in some circumstances.
Key Takeaways
- hidden expresses an HTML-level hidden state.
- CSS display controls presentation and can interact with HTML state.
Knowledge Check
Which is an HTML global attribute for indicating hidden content?