

- 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
Do you need text/javascript specified in your <script> tags?
In an HTML page, mostly text/javascript is used in the <script> tag.
Here’s an example
<script type="text/javascript"> </script>
However, the introduction of HTML5 brought some new improvements. JavaScript became the default language for HTML5 and modern browsers. Therefore, now adding text/javascript isn’t required in <script> tag.
<script> </script>
Example
Let’s see an example in jQuery.
<html> <head> <title> jQuery Example</title> <script src = “https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script> <script> $(document).ready(function(){ document.write("Hello, World!"); }); </script> </head> <body> <h1>Hello</h1> </body> </html>
- Related Questions & Answers
- Should I include type=“text/javascript” in my SCRIPT tags?
- What you need to do when your phone is lost or stolen
- What do you need to join the metaverse?
- Why do we need weakMaps in Javascript?
- Should I include language="javascript" in my SCRIPT tags?
- Why do you celebrate your birthday every year?
- What are your values? What do you represent? What do you want to embody?
- What is emotional intelligence and why do you need it?
- Do you need any special qualification to be a pharmacist?
- What Is a Firewall and Why Do You Need One?
- Do we need to use semicolons in JavaScript?
- Making your own custom filter tags in Django
- What will you do to make your man go crazy in love with you?
- Need to schedule script in PowerShell from SAP
- What type of husband do you suggest to your daughter?
Advertisements