Why hasn’t `<script>` gotten a (standardized) void version yet?

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? Ei…


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


Print Share Comment Cite Upload Translate Updates
APA

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/

MLA
" » Why hasn’t `<script>` gotten a (standardized) void version yet?." Calin Baenen | Sciencx - Saturday April 10, 2021, https://www.scien.cx/2021/04/10/why-hasnt-script-gotten-a-standardized-void-version-yet/
HARVARD
Calin Baenen | Sciencx Saturday April 10, 2021 » Why hasn’t `<script>` gotten a (standardized) void version yet?., viewed ,<https://www.scien.cx/2021/04/10/why-hasnt-script-gotten-a-standardized-void-version-yet/>
VANCOUVER
Calin Baenen | Sciencx - » Why hasn’t `<script>` gotten a (standardized) void version yet?. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2021/04/10/why-hasnt-script-gotten-a-standardized-void-version-yet/
CHICAGO
" » Why hasn’t `<script>` gotten a (standardized) void version yet?." Calin Baenen | Sciencx - Accessed . https://www.scien.cx/2021/04/10/why-hasnt-script-gotten-a-standardized-void-version-yet/
IEEE
" » Why hasn’t `<script>` gotten a (standardized) void version yet?." Calin Baenen | Sciencx [Online]. Available: https://www.scien.cx/2021/04/10/why-hasnt-script-gotten-a-standardized-void-version-yet/. [Accessed: ]
rf:citation
» Why hasn’t `<script>` gotten a (standardized) void version yet? | Calin Baenen | Sciencx | 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.

You must be logged in to translate posts. Please log in or register.