⟩ How are tag positions used in JavaScript?
► The tag can be inserted in a document wherever there is a requirement for a tag to be put. Nested tags are also possible within a <HEAD>...</HEAD> tag. There are many other ways to use the tag like inside <BODY>...</BODY> section.
► The tags can be placed inside <SCRIPT> tag also. The position of a particular tag is not fixed and it can be placed anywhere in the HTML document. Head is a used to place the tags that consists of noncontent settings.
► The example will show the position of <SCRIPT> tag :
<HTML>
<HEAD>
<TITLE>Tag position</TITLE>
<SCRIPT LANGUAGE="Text/JavaScript">
// your script statement(s) here
</SCRIPT>
</HEAD>
<BODY>
</BODY>
</HTML>
► This uses the <SCRIPT> tag inside the HEAD section.
► There is one more code that will show the positon of <SCRIPT> in body section and it is as :
<HTML>
<HEAD>
<TITLE>Tag position</TITLE>
</HEAD>
<BODY>
<SCRIPT LANGUAGE="Text/JavaScript">
// your script statement(s) here
</SCRIPT>
</BODY>
</HTML>