I am completely new to the world of web development. I'm encountering an issue where my JavaScript code (specifically alerts) is loading before my HTML/CSS page has fully loaded. I've been using sample alerts to test this out, and ideally, they should only display after the entire web page has finished loading. After doing some research on Google, I found that many people suggest placing the call to the Java Script file at the end of the HTML document, and that's exactly what I've done. However, the problem still persists.
function go() {
alert('hi');
alert('hey there');
}
go();
<header>
<nav>
<h1 class = "second"> RESUMAKER </h1>
<ul>
<li><a href="build.html" target="_blank"><span> Build Your Resume </span></a></li>
<li><a href="createaccount.html" target="_blank"><span> Create Account </span></a></li>
<li><a href="signin.html" target="_blank"><span> Sign in </span></a></li>
<li><a href="resources.html" target="_blank"><span> Resources </span></a></li>
<li><a href="contacts.html" target="_blank"><span> Talk To Us </span></a></li>
</ul>
</nav>
</header>
<h1 class = "third"><strong> What we do? </strong></h1>
<p> 1. We create your resume when you input information such as personal information, educational history, work experience and skills. </p>
<p> 2. The inputted information will be collected, stored, converted and in turn generate arrays of information which can be transformed into a resume.</p>
<p> 3. Then we let you select a predefined resume template all with different fonts and designs, to generate a resume. </p>
<p> 4. After all that is done, we allow you to be able to download generated resume as a PDF, Google or Microsoft Word document. </p>
<div class="footer">
<li><a href="build.html" target="_blank"> Build a resume </a></li>
<li><a href="createaccount.html" target="_blank"> Create Account </a></li>
<li><a href="signin.html" target="_blank"> Sign in </a></li>
<li><a href="resources.html" target="_blank"> Resources </a></li>
<li><a href="contacts.html" target="_blank"> Contact us </a></li>
</div>
<div class="icon-bar">
<a href="#" class="facebook"><i class="fa fa-facebook"></i></a>
<a href="#" class="twitter"><i class="fa fa-twitter"></i></a>
<a href="#" class="google"><i class="fa fa-google"></i></a>
<a href="#" class="linkedin"><i class="fa fa-linkedin"></i></a>
<a href="#" class="youtube"><i class="fa fa-youtube"></i></a>
</div>