Inline `<script>` and `<style>` vs. external `.js` and `.css` — what’s the size threshold?

When is it acceptable to use inline elements? When is it better to use separate .js files? The same question can be asked about inline vs. linked CSS — where do you draw the line?

I had been pondering about this for a while, but while writing my post…


This content originally appeared on Mathias Bynens and was authored by Mathias

When is it acceptable to use inline
Print Share Comment Cite Upload Translate Updates
APA

Mathias | Sciencx (2010-04-10T20:44:59+00:00) Inline `<script>` and `<style>` vs. external `.js` and `.css` — what’s the size threshold?. Retrieved from https://www.scien.cx/2010/04/10/inline-script-and-style-vs-external-js-and-css-whats-the-size-threshold/

MLA
" » Inline `<script>` and `<style>` vs. external `.js` and `.css` — what’s the size threshold?." Mathias | Sciencx - Saturday April 10, 2010, https://www.scien.cx/2010/04/10/inline-script-and-style-vs-external-js-and-css-whats-the-size-threshold/
HARVARD
Mathias | Sciencx Saturday April 10, 2010 » Inline `<script>` and `<style>` vs. external `.js` and `.css` — what’s the size threshold?., viewed ,<https://www.scien.cx/2010/04/10/inline-script-and-style-vs-external-js-and-css-whats-the-size-threshold/>
VANCOUVER
Mathias | Sciencx - » Inline `<script>` and `<style>` vs. external `.js` and `.css` — what’s the size threshold?. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2010/04/10/inline-script-and-style-vs-external-js-and-css-whats-the-size-threshold/
CHICAGO
" » Inline `<script>` and `<style>` vs. external `.js` and `.css` — what’s the size threshold?." Mathias | Sciencx - Accessed . https://www.scien.cx/2010/04/10/inline-script-and-style-vs-external-js-and-css-whats-the-size-threshold/
IEEE
" » Inline `<script>` and `<style>` vs. external `.js` and `.css` — what’s the size threshold?." Mathias | Sciencx [Online]. Available: https://www.scien.cx/2010/04/10/inline-script-and-style-vs-external-js-and-css-whats-the-size-threshold/. [Accessed: ]
rf:citation
» Inline `<script>` and `<style>` vs. external `.js` and `.css` — what’s the size threshold? | Mathias | Sciencx | https://www.scien.cx/2010/04/10/inline-script-and-style-vs-external-js-and-css-whats-the-size-threshold/ |

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.