by Mohd Shibli
Posted on 20 March 2017
Client Side Scripting
A scripting language is a language which does not need to be compiled before it run, all the interpretation is done on the fly by the client.
Client Side means the language is going to be executed at the client side or in simple words we can say that it is going to be executed at the web browser instead of the server(server side scripting languages such as php are executed on the servers).
HTML Script Tags
Script tags tell the web browser that the code inside script tag is a client side script, script tags can be used anywhere in the html page but it is mostly prefered to write script tags inside the head tags so that the script can be processed first before loading of the body elements.
See the syntax for script tags
Identifying the scripting langauge
Creating your first script
<!DOCTYPE html> <html> <head> <title>Hello world</title> </head> <body> <script> document.write("<p>Hello world</p>"); </script> </body> </html>
Save the file as hello.html and run it in your web browser.
The above code will print "Hello world" on your browsers screen:
<script> document.write("<a href='http://www.psychocodes.in'>My website</a>"); </script>
The above code will create a link to www.psychocodes.in
Do it yourself
Try working with some more html tags inside the document.write() function.
Thank you for reading.
Also, don't forget to subscribe to our Newsletter.
If you like this article, then please share it and help us grow.
Preorder and Postorder Traversal of binary tree in Python
02 September 2018
Binary Tree in Python
02 September 2018
Explaining Register variables in C with examples
17 August 2018
Data Autosave System using PHP, MySQL and AJAX
06 July 2018