<script> HTML Tag

In this article we will discuss about how to use the script tag in HTML.
  • 1692

The script tag allow us to include the scripting language such as JavaScript in our HTML document which is used to provide the dynamic functionality in our document. It is always specified within the head tag in HTML.

HTML Code:



    <script type="text/javascript">

        function displayName() {

            document.getElementById("hiiii").innerHTML = "Hello welcome to all to the dotnetheaven";






        My First Web Page</h1>

    <p id="hiiii">

        This is a paragraph.</p>

    <button type="button" onclick="displayName()">

        Display Name</button>





Ask Your Question 

Got a programming related question? You may want to post your question here

Programming Answers here

© 2020 DotNetHeaven. All rights reserved.