multiple versus single script tags

Viewed 21169

Is there any difference (performance, best practices, etc) between using a single script tag with embedded code in it, or using multiple script tags with the same code spread all over the HTML?

For example:

<script>
    foo();
</script>
...
<script>
    bar();
</script>

versus:

<script>
    foo();
    bar();
</script>

Thanks

5 Answers

I USE multiple tags. One for Slideshow of Images and another for Slideshow of Texts, so I can have both on the same web page - slideshow of images and slideshow of texts.

Related