Chapter 2. Preparing for Website Coding

Website Directory Structure

Website Directory Structure
Tag:

The website structure follows the document structure of the website. When a website becomes larger, it uses a lot of files and directories. Having a consistent directory structure is helpful for efficient coding development and maintenance.

There is no strict rule for the website project directory structure, but the following approaches are often used.

Website Directory Structure Typical Approach

  • Put the index.html file directly under the project's main directory
  • Use the img directory to organize image files
  • Use the css directory to organize CSS files
  • Use sub-directories when the number of files becomes larger

The website structure follows the document structure of the website. When a website becomes larger, it uses a lot of files and directories. Having a consistent directory structure is helpful for efficient coding development and maintenance.

There is no strict rule for the website project directory structure, but the following approaches are often used.

Website Directory Structure Typical Approach

  • Put the index.html file directly under the project's main directory
  • Use the img directory to organize image files
  • Use the css directory to organize CSS files
  • Use sub-directories when the number of files becomes larger
Tag: