This content originally appeared on DEV Community and was authored by Calin Baenen
I know some browsers will recognize
<script src="file.js"/>
as
<script src="file.js"></script>
as that's basically what a void element is.
But, not all browsers do (one being the one I use, FireFox).
Why is this? Either you should be able to smush a script into the second in to the second example's body, OR it should always be a viable option to use the first example, because without either the script
tag(s) look ugly, and it's wasting some space.
It may not be a huge deal, but I see it as mildly annoying, especially if there are lots of tags grabbing a script from somewhere.
This content originally appeared on DEV Community and was authored by Calin Baenen
Calin Baenen | Sciencx (2021-04-10T20:21:30+00:00) Why hasn’t `<script>` gotten a (standardized) void version yet?. Retrieved from https://www.scien.cx/2021/04/10/why-hasnt-script-gotten-a-standardized-void-version-yet/
Please log in to upload a file.
There are no updates yet.
Click the Upload button above to add an update.