- 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
What are the types of tags involved in javascript?
Html <script> tag
a) The <script> tag is used to define a client-side script.
b) The <script> tag contains scripting statements or an external script file.
JavaScript code must be keep in script tag.Let's see the use of the tag. For suppose declare the variable outside the script tag.
Example
<html> <body> <p id="tag"></p> var a = 1; <script> var b = 2; var c = a + b; document.getElementById("tag").innerHTML = c; </script> </body> </html>
Output
var a = 1
For suppose, let the variable be declared inside the script tag.
Example
<html> <body> <p id="tag"></p> <script> var a = 1; var b = 2; var c = a + b; document.getElementById("tag").innerHTML = c; </script> </body> </html>
Output
3
- Related Articles
- What the different types of JSTL tags are ?
- What are the various types of comments in JavaScript?
- What types of logical operators are in javascript?
- How many types of directive tags JSP supports?
- What are primitive data types in JavaScript?
- What are Complex Data types in JavaScript?
- What are JSTL Core tags in JSP?
- What are JSTL formatting tags in JSP?
- What are the types of ICMP message types?
- What are the essential tags for an HTML Document?
- What are the three types of errors I can expect in my JavaScript script?
- What are the types of Compilers?
- What are the types of Steganography?
- What are the types of Xylem?
- What are the types of autotrophs?

Advertisements