Welcome to the Treehouse Community
Looking to learn something new?
Marcel Moritz15,111 Points
'type' attribute in header tags
Do I really need the 'type' attribute in tags like <script> and <link>. I tried it out and it seems that everything is working properly. Wouldn't it be lighter to leave them?
James Barnett39,199 Points
If you are talking about the
<style> elements then yes you can leave out the
type attribute for those elements. Although you aren't likely save any space.
Wayne Priestley19,579 Points
I would suggest trying to keep your code as semantic as possible where you can, the few tags you need to do this really isn't going to make any difference at all to your code size.
It would be probably lighter to leave them out, but not by much. If you're trying to be really aggressive with future code, you could include them, but understand the cost of potentially having to update later because it isn't officially adopted or because it has no real use going forward. You need to determine what your goal is, but for now, it's not going to be impactful for you to leave it out.