Code not working? Here are some common mistakes that can trip up even the most experienced coder. If your code won’t run, try running down this checklist to see if you have any of these errors:
Not having a closing HTML tag after every opening HTML tag
. Missing brackets < or > in HTML.
Missing curly braces, colons, or semicolons in CSS, as in the following:
h1 { color: blue; }
Missing curly braces in JavaScript, especially for if statements.
Forgetting to have a pair of closing pair of quotes for every opening pair of quotes.
Having more than one opening and closing tag, tag, or tag.
Putting HTML code in the CSS file or section, and putting CSS code in the HTML section. If the code deals with style and appearance, it’s likely CSS.
Not linking to your CSS file using the tag, and so your CSS effects don’t render in the browser.
Misspelling a part of a command, as in , which is incorrect because the attribute is spelled src not scr.
Including attributes outside the opening HTML tag. For example, src="logo.jpg" is incorrect because the attribute is outside the opening image tag.