It's always a good practice to add jQuery code in footer i.e. just before the closing tag. If you have not done that, then use the defer attribute. The defer attribute is used to specify that the script execution occurs when the page loads.
tag rather than in the
section of your HTML. The reason for this is that HTML loads from top to bottom. The head loads first, then the body, and then everything inside the body.
What is CSS? CSS is the language for describing the presentation of Web pages, including colors, layout, and fonts. ... CSS is independent of HTML and can be used with any XML-based markup language.
The typical options is using the onload event: