Coding For Dummies
Book image
Explore Book Buy On Amazon

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

About This Article

This article is from the book:

About the book author:

Nikhil Abraham is the CFO of Udacity, an education company that teaches technology skills that help launch or advance a career. Prior to joining Udacity, Abraham worked at Codecademy, where he taught beginning coders across a variety of professions. He is also author of Coding For Dummies and Getting a Coding Job For Dummies.

This article can be found in the category: