There are a lot of conventions in web design and development, meaning “the typical ways things are done.” When you don’t follow the conventions, sometimes it would make a hiring person scratch her head and wonder why you don’t do things in the typical way.
The way we name files and folders in websites and apps follows some conventions. Some of these make a huge difference, and some are just for convenience.
- The primary HTML file on a site, or in a subject folder, is named index.html. This is more than just a convention — the browser will open that file automatically if it is left off the end of the URL. Examples:
https://weimergeeks.com/ (index.html at top level of site opens)
https://weimergeeks.com/examples/ (index.html in the /examples/ folder opens)
- The primary CSS file for a site or a project usually has a name that indicates its status as the main CSS for the site. Thus many web developers would name it main.css, or possibly styles.css. Some people like to name it default.css or site.css. When you have different projects, you will likely name the style files to match the project name. Look in the /css/ folder here to see examples.
As you continue learning and exploring other people’s projects, you will probably see folders named assets, modules, components, model, view — these will contain components that make the site or app work, rather than pure HTML files.
- Filenames and folder names NEVER have spaces in them.
- They contain no punctuation other than possibly an underscore or a hyphen.
- Do not use uppercase letters in filenames or folder names.
- All files have a file extension — .html, .css, .jpg, .png, etc.
- The only dot in a filename is the one at the start of the file extension.
Follow the conventions, and your work will be easier!