<!DOCTYPE html>
<html>
<body>
<p style="hidden: true;" id="demo">Hello!</p>
</body>
</html>
Why doesn't hidden: true;
hide the paragraph? I can see it on the web page
<!DOCTYPE html>
<html>
<body>
<p style="hidden: true;" id="demo">Hello!</p>
</body>
</html>
Why doesn't hidden: true;
hide the paragraph? I can see it on the web page
Try using visibility: hidden;
for your style or you can use the hidden attribute like this
<p hidden>Hello!</p>
hidden: true
is not a valid css attribute
use:
<p style="display: none;" id="demo">Hello!</p>
this means that the tag will not appear on the page and there will be no space allocated
or:
<p style="visibility: hidden;" id="demo">Hello!</p>
this means that the tag is not visible, but space is allocated for it.