1. The Law of Lowercase
The Rule: Always use lowercase-letters. Never use Capital-Letters.
Most web servers run on Linux. To a server, MyImage.jpg and myimage.jpg are two completely different files. If your code uses lowercase but your file has a capital letter, the server will return a 404 Error.
- Bad: AboutMe.html, Header.JPG
- Good: aboutme.html, header.jpg
2. The No-Space Zone
The Rule: Never use the spacebar in a filename or folder name.
Browsers convert spaces into %20. Instead, use a hyphen (-) or an underscore (_).
- Bad: my project.html, profile picture.png
- Good: my-project.html, profile_picture.png
3. The "Index" Requirement
The Rule: Your main homepage must be named index.html.
The server automatically looks for this specific filename. Without it, visitors see a directory list of your files instead of your design.
4. Only "Web-Safe" Characters
The Rule: Only use letters, numbers, hyphens, and underscores.
Characters to AVOID: ?, !, @, #, $, %, &, *, (, ), +
5. File Extensions Matter
Ensure your file ends with the correct extension: .html, .css, .jpg, or .png. Watch out for hidden extensions like index.html.txt.
Final Checklist
| Feature | Avoid This ❌ | Use This ✅ |
|---|---|---|
| Capitalization | Contact.html | contact.html |
| Spaces | my folder | my-folder |
| Homepage | home.html | index.html |