I wonder if there is any difference in the result when hiding an element with JavaScript attribute or CSS Style.
For example:
element.setAttribute("hidden", true);
vs
element.style.visibility = "hidden";
I experimented a bit with those two possibilities. My assumption is, that when hiding it with JavaScript, the element is truly hidden and taken out of the flow; and when hiding with CSS Style the element is just not shown but still there.
Mostly this seemed right in my experiments, but sometimes not. So, what is the real difference between those two possibilities?
display:none
style withhidden
attr. – Romina