Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

JavaScript DOM Scripting By Example Adding and Removing Names Tour the Application

professionalb
seal-mask
.a{fill-rule:evenodd;}techdegree
professionalb
Full Stack JavaScript Techdegree Student 5,082 Points

Linking JS file to HTML in HTML5

In the example, Guil linked the js.app file to the index.html file with the following script tag.

<script type="text/javascript" src="app.js"></script>

Correct me if I'm wrong, but it seems with HTML5, adding the attribute, type="text/javascript", is not needed anymore.

Is there any reason why we would continue to do it this way? Is there a best practice I'm unaware of?

1 Answer

Clayton Perszyk
MOD
Clayton Perszyk
Treehouse Moderator 48,723 Points

Probably just did it out of habit. Also, not sure, but it might be considered best practice to include it, even if it is not necessary.