How do I find errors in my code?

It's really important as a developer to be able to debug your code, so if you haven't already, check out this lesson:
Common Beginner Mistakes (So You Won’t Have to Make ‘Em!)

And our problem solving guide.

If you're stuck, or to periodically make sure you haven't introduced errors, it's super helpful to run your code through a validator! 

Keep in mind that if your text editor or the validator is warning you that something is amiss with your code, it might not be an error in the line of code called out; the issue could be in a line(s) above it. Your site reads your HTML and CSS from top to bottom, so an error up higher on your stylesheet, for instance, means that elements that follow may not work.

Also check that you are making your edits in the right file. See if your text editor has the ability to open your site folder/project directory rather than just individual files. This allows you to drill down through the folders until you get to the file you want. Not only is it faster for you to move between your project's HTML and CSS files, but you'll always know you are editing the right file in the right folder. Since naming conventions like index.html and main.css will be used for multiple sites, organizing your files will help ensure you don't get them confused.

And consider doing a hard refresh when you go to look at your changes in the browser.

If you're ever confused about what you absolutely need in an HTML document, review the following materials:

Note that all of your content for your site must be between your body tag. :)

Still need help? Contact Us Contact Us