Javascript in HTML

If you want to create dynamic functionsin your website javascript is necessary. In this page complete use and syntax of javascript is given.There are various method to include javascript in html file.

Click on this button for your warm welcome!

Welcome friend!

Syntax for inner javascript in html

code here...

If you are using javascript in the html file than you have do all the code of javascript in between the script tag. Else it will create an error.

External file of javascript

<script scr" file path "> </script>

In above example External file of javascript is joined in html.Here in script tag "src" attribute is given which is used to locate the external file. In the "src" attribute place the url of external file and then scr attribute will fetch that url.

Alternate of script.

Sorry you browser does not support the script...

noscript tag like "alt" attribute in images when some image does not display then the text written in "alt" attribute is shown there.Similarly the noscript tag is alternate of script. If some time some browser does not support the scritpt then this text will display which was place in noscript tag.

Advantages of javascript

Speed of javascript is very fast because it runs mostly on client's browser. Javascript is easy to learn because there is simplicity in javascript code as compare to java and other languages.Popularity of javascript is it's main and most important advantage because it is increasingly used on the back-end and front end.Less in Server Load is another advantage of javascript because it is a client side language so it reduces the load on server.

The Best

Comment here

If you have any query, if you want to know something about any of technical course related to computer science field, if you have any suggestion about relevant to uploaded content or if you anything wrong here (any mistake in content) than please contact us. Keep in mind, comment should be according to community guidelines.