How write a syntax to set a default display none for a fieldset?

I DO NOT want to use an style.css file. I just want to write inline with the html element right in the html file.

I have this line of code that I want to hide the fieldset, but it isn’t working, likely because of syntax eror.

<fieldset id = fieldsetpump2 style = display: "none">

^^ I want this to be the default value, then I want it to show only when the user selects the related input box.

The input boxes are working good on showing and hiding the fieldsets as I click through the input boxes, but the default as the page loads is automatically showing fieldsets that I want to automatically hide by default unless the appropriate check box is clicked.

Codepen: line 63

This isn’t the correct syntax for an inline style.

Yes… I am trying to find out which one would be the correct syntax.

Here is the freeCodeCamp lesson that covers inline styles.

1 Like

Thanks a billion!!

The “” where in the wrong place.

Good job tracking down the bug. Happy coding!

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.