I am really new to web development. For some reason, the Javascript code (alerts) load even before my HTML/CSS page is loaded. I am using sample alerts to see what happens with the code. It should ideally load the whole web page before it shows the alerts. I looked up on Google for a while and almost every one had said to have call to the Java Script file at the end and that's what I have. It still does not work.
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>