JavaScript Language In HTML: Basic HTML

JavaScript Language
We will learn more about JavaScript in the next lesson, so here is you only can find the introduction of the javascript and how it is used in html document.

Javascript is client side scripting language which is one of the most important web designing langauge among the html, css and javascript. <script> tag is used to create a script in the html document. Basically javascript is used to manipulate the images, to validate the form and to change the content dynamically. JavaScript only work with HTML and CSS. The given below example can be the best for the basic of javascript.

Actually javascript is very easy language to learn. Nowadays, most of the designers use this language to develop webpages.

Javascript is very powerful language which can change HTML elements and it also can change the attributes of html and css elements. We will give all the examples that are needed for learning all the the html elements change, attributes change, css elements change.

<html>
<body>
<script>
var a="Excuse me";

document.write("Hello Dude!")

alert("Hi buddy");

document.write(a);
</script>
</body>
</html>


If we use the <noscript> tag, When there is javascript disabled by the browser, the message written in the <noscript> tag will be shown by the browser. Lets see the given example how nosript tag is used and it works.


<html>
<body>
<script>
document.write("Excuse Me Buddy")
</script>
<noscript>Sorry, some problems occurred here.</noscript>
<p>Javascript doesnot work if the script is disabled in the browser.</p>
</body>
</html>

Indeed you should know that <script> and <noscript> both are reverse of each other. But <script> is mostly used by developer rather than <noscript>.


If you have any questions, please comment us. 
Thank you. 

Post a Comment

0 Comments