The script tag takes two important attributes −
This function can be used to write text, HTML, or both. Take a look at the following code.
Whitespace and Line Breaks
Semicolons are Optional
But when formatted in a single line as follows, you must use semicolons −
Note − It is a good programming practice to use semicolons.
- Any text between the characters /* and */ is treated as a comment. This may span multiple lines.