the <script>… </script> HTML labels in a site page.
you should keep it inside the <head> labels.
The <script> label cautions the program to begin deciphering all the content between these labels as a content.
The content label takes two significant traits −
Language − This property indicates what scripting language you are utilizing. Ordinarily,
Type − This property is what is presently prescribed to demonstrate the scripting
Give us a chance to take an example guide to print out “Hi World”. We included a discretionary HTML
so we add that to keep a program from perusing the finish of the HTML remark as a
our HTML record.
This function can be utilized to compose the content, HTML, or both. Investigate the accompanying code.
This code will create the accompanying outcome −
Whitespace and Line Breaks
You can utilize spaces, tabs, and newlines uninhibitedly in your program and you are allowed to
the arrangement and indent your projects in a slick and reliable manner that makes the code simple
to peruse and get it.
Semicolons are Optional
In any case, when arranged in a solitary line as pursues, you should utilize semicolons −
Note − It is a decent programming practice to utilize semicolons.
factors, function names, and some other identifiers should consistently be composed with a predictable
capitalization of letters.
- Any content between the characters/* and */is treated as a remark. This may traverse different lines.