With the direct hidden attribute from CSS it can be achieved
<style>
/*
Los estilos puedes ponerlos al inicio de tu documento HTML o puedes
meterlos en un archivo por separado
*/
.auto{
display: none;
}
</style>
<div class="auto" id="auto">
Ocultar
</div>
Always try not to let your CSS code get mixed up with your HTML as it makes it unmaintainable as your project grows
If you decide to put your CSS code in an external file put the tag to invoke it after your last meta tag at the top, it should look something like this
I recommend the above to avoid that when you resume the project or someone else participates, the process of making modifications becomes complex and difficult.
First we must have our HTML structure where there will be a button that will activate a JavaScript function that will change the CSS to show the effect. in this case the button will be a div
although this does what you want, you should at all costs avoid using "inline styles" for this kind of thing the best way would be to use CSS from an external file and change the properties using JavaScript
With the style "display: none" you can hide it
With the direct hidden attribute from CSS it can be achieved
If you decide to put your CSS code in an external file put the tag to invoke it after your last meta tag at the top, it should look something like this
I recommend the above to avoid that when you resume the project or someone else participates, the process of making modifications becomes complex and difficult.
First we must have our HTML structure where there will be a button that will activate a JavaScript function that will change the CSS to show the effect. in this case the button will be a div
although this does what you want, you should at all costs avoid using "inline styles" for this kind of thing the best way would be to use CSS from an external file and change the properties using JavaScript
This is my solution friend: