

- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Should I include language="javascript" in my SCRIPT tags?
The language attribute in JavaScript is optional since the introduction of HTML5 brought some new improvements. JavaScript became the default language for HTML5 and modern browsers. Therefore, now adding javascript isn’t required in <script> tag.
This attribute specifies what scripting language you are using. Typically, its value will be javascript. Although recent versions of HTML (and XHTML, its successor) have phased out the use of this attribute.
Here you can see how it is used:
<html> <body> <script> <!-- document.write("Hello World!") //--> </script> </body> </html>
- Related Questions & Answers
- Should I include type=“text/javascript” in my SCRIPT tags?
- Where should I put <script> tags in HTML markup?
- How should I manage my life?
- Should I write my script in the body or the head of the HTML?
- Should I always put my JavaScript file in the head tag of my HTML file?
- Why should I not #include <bits/stdc++.h>?
- My girlfriend never appreciates me, what should I do?
- What are the three types of errors I can expect in my JavaScript script?
- How can I remove the (//<![CDATA[ , //]]>) blocks; tags inside a script element in Javascript?
- Being a girl should I give importance to my looks?
- What Should I Do If My IP Address Is Exposed?
- When should I use an Inline script and when to use external JavaScript file?
- In college, if I am being ragged by my seniors, whom should I complain?
- Do you need text/javascript specified in your <script> tags?
- What should I do if someone copies my website/blog content?
Advertisements