I have seen many different ways to declare a script tag. Some of them:
Option 1:
<script type="text/javascript">
</script>
Option 2:
<script type="text/javascript">
//<![CDATA[
// some javascript here
//]]>
</script>
Option 3:
<script language="javascript">
</script>
Option 4:
<script>
</script>
There are other options. When we work in HTML5 + js, then which method is more appropriate when declaring a script tag?
source
share