What is the difference between “display: none” and “visibility: hidden”, when used as attributes to the HTML element.



What is the difference between “display: none” and “visibility: hidden”, whe..

Answer / nashiinformaticssolutions

When we use the attribute “visibility: hidden” for an HTML element then that element will be hidden from the webpage but still takes up space. Whereas, if we use the “display: none” attribute for an HTML element then the element will be hidden, and also it won’t take up any space on the webpage.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More HTML DHTML Interview Questions

What is html and why it is used for?

0 Answers  


What is xpath in html?

0 Answers  


Why xhtml is used?

0 Answers  


How do I detect what browser is being used?

2 Answers  


Can HTML 5 get the geographical position of a user?

0 Answers  


Is there a way to get indexed better by the search engines?

1 Answers  


How to create scrollable tables in HTML-DHTML? My doubt is "I want to create a table whose header will remain stationery when I scroll the table vertically, but at the same time when I scroll horizontally, the header should scorll sidewise along with the body."

0 Answers  


Is <img> being replaced by <object> in XHTML2?

1 Answers  


What is the difference between innertext and textcontent?

0 Answers  


What is td and tr?

0 Answers  


How can we club two or more rows or columns into a single row or column in an HTML table?

1 Answers  


What is the use of Canvas element?

0 Answers  


Categories