Naming conventions

An overview of the naming conventions we’ll follow for all of the Web Dev courses.

Go fullscreen: ⌃⌥F

Naming conventions

Naming conventions

  1. All lowercase.
  2. No spaces!
  3. Only letters, numbers, and dashes (-).

These apply to all files & all folders created for the Web Dev courses.

All lowercase

Different operating systems treat capitalization in filenames differently.

We’ll standardize on lowercase to make things more consistent and easier.

No spaces!

URLs literally cannot have spaces in them.

Since we’re making websites & everything is a URL, our filenames also cannot have spaces.

Only letters, numbers, and dashes (-)

URLs only allow ASCII characters unless the characters are encoded.

Since the specification specifically disallows non-ASCII characters our filenames will use only basic characters.

Good

index.html
dinosaurs.jpg
t-rex.jpg
prehistoric-creatures-of-the-deep.html

Bad

Index.html   <-- Web server won’t find & load the page
t rex.jpg    <-- Browser may not be able to find the image
prehistoric_creatures_of_the_deep.jpg    <-- Google will treat this as a single word

Naming conventions

  1. All lowercase.
  2. No spaces!
  3. Only letters, numbers, and dashes (-).
Start

Naming conventions

An overview of the naming conventions we’ll follow for all of the Web Dev courses.