Description
Using display block on script and style blocks is a simple way to make HTML tutorials easier. Tagged with css, tricks, tutorials.
Summary
- Sometimes when you build a demo HTML document and you want to display the source code of the script in it.
- Giving it some padding and margins to display it over the box makes it stand out.
- Whilst this is cool and all, it is not a good idea to put out into the wild without any filtering server-side scripts, as an editable block also allows attackers to include any JavaScript to steal credentials and override other scripts on your server.