www.wd4e.com

Code Placement

When you write code, it is important to get into the good habits of organizing your code. While there are no specific rules about how and where to place your code, there are definitely conventions. (Conventions are suggestions that most programmers follow. This way other programmers can quickly and easily understand their code.)

The most common organization is to have one main folder with your html files in it. There are also three subfolders (folders inside the main folder) for your CSS, image, and JavaScript files.



When we use CodePen we use that idea of separating our code. However, be aware that CodePen doesn't require many of the things you should have in your code. For instance, in the HTML files it ignores all of the information in the head section. So if you develop in CodePen, make sure to test your code later using the proper folder/file structure. You will need to include links to the style sheets, images, and any external JavaScript files.