Invisible content
Sometimes we want to hide content on websites, either visually or completely, for a variety of reasons. Getting it right is important, as hiding things with CSS can have an accessibility impact.
My personal go-to resource is Tollwerk's thorough overview of the various methods and their pros and cons (in German):
Manchmal ist es erforderlich, Inhalte einer Website dauerhaft, zeitweise oder für bestimmte Zielgruppen zu verbergen. Es existieren unterschiedliche Techniken zu diesem Zweck, und jede hat ihre eigenen Vorzüge und Auswirkungen auf die Barrierefreiheit und assistive Technologien. Wir zeigen, welche Methode sich wann besonders eignet und was daran zu beachten ist.
Similar systematic evaluations of methods (with different observations on some details) are available from:
In this article, I want to discuss all the ways to hide something, be it through HTML or CSS, and when to use which.
In depth
For the ultimate analysis of hiding methods and their impact, Vincent Valentin's tabular matrix covers all aspects of any technique available: