Find the Performance Mistake
Find the Mistake Medium
Question
This page renders slowly. Find the performance mistake.
Code
<head>
<script src="large-lib.js"></script>
</head>
<body>
<h1>Welcome</h1>
</body>
Hint
The script is in the head without any loading attributes.
Explanation
The <script> tag in the <head> without 'defer' or 'async' blocks HTML parsing while the script downloads and executes. The page appears blank until large-lib.js is fully loaded. Moving the script to the end of <body> or adding 'defer' allows the HTML to render first.
Related Resources
Related Lessons
Look up unfamiliar terms
A beginner-friendly glossary explains jargon in plain English — variables, functions, DOM, Promise, and more.
Decode error messages
Plain-English explanations of common errors — what they mean, why they happen, and how to fix them.
Build real projects
Apply what you learned by building guided projects with starter code and solutions.