Explore Courses Blog Tutorials Interview Questions
0 votes
1 view
in Java by (9.5k points)

Below is my HTML code:

<div style="display: none; ">aaa</div>

<a href="#" style="display: none; ">(bbb)</a>

<span style="display: none; ">ccc</span>

I want to remove the attribute of the first HTML <div> tag like below:

<div style="display: none; ">aaa</div>



Can anyone tell me how to do this?

1 Answer

0 votes
by (19.7k points)

If you want to remove it from the first element, you can  use .removeAttr():


If you use .show() , it will show the element by removing the display property:


Interested in Java? Check out this Java Certification by Intellipaat.  

Related questions

Browse Categories