This is the html code. Please follow the below steps to run this code.
- Open notepad
- Copy the below code to the notepad.
- Goto File -> Save as
- Select All Files in type.
- Enter the file name and click Save.
After performing all these steps, double click the saved Html/Javascript file and it will appear in the browser.
<!DOCTYPE html>
<html>
<body>
<h2>Your name will be dispalyed below</h2>
<p id="message_id"></p>
<script>
var textMessage = prompt("Kindly enter your name here: ", "Mohit Singla");
document.getElementById("message_id").innerHTML = 'Welcome <b>' + textMessage +'</b>. You are new visitor to our webpage';
</script>
</body>
</html>

Please comment below for more queries regarding this article.