- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- 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 Articles
- Should I include type=“text/javascript” in my SCRIPT tags?
- Should I write my script in the body or the head of the HTML?
- How can I remove the (//) blocks; tags inside a script element in Javascript?
- Why should I not #include ?
- Where should I put tags in HTML markup?
- Should I always put my JavaScript file in the head tag of my HTML file?
- What are the three types of errors I can expect in my JavaScript script?
- How should I manage my life?
- When should I use an Inline script and when to use external JavaScript file?
- My girlfriend never appreciates me, what should I do?
- How do I check what version of Python is running my script?
- In college, if I am being ragged by my seniors, whom should I complain?
- Being a girl should I give importance to my looks?
- What Should I Do If My IP Address Is Exposed?
- Are HTML comments inside script tags a best practice?

Advertisements