Skip to content
GitHub

Creating a Multi-Page Website

Switch to Zen Mode

Before you start building, plan the structure of your website: Identify the pages you need and the type of content that will be displayed.

For a simple website, you could have the following pages:

  • Home Page
  • About Page
  • Contact Page
  • Resources
    • CSS Styles
    • Images

Create a folder on your computer to hold all your website files. Here is a typical folder structure for a simple static website:

  • /my-website
    • index.html (Home Page)
    • about.html (About Page)
    • contact.html (Contact Page)
    • /images (Folder for images)
    • /css (Folder for CSS styles)
    • /js (Folder for JavaScript, optional)

Here is a basic folder structure for a static website:

/my-website
├── index.html # Home Page
├── about.html # About Page
├── contact.html # Contact Page
├── /images # Folder to store images
│ ├── logo.png # Example image
│ └── banner.jpg # Example image
├── /css # Folder for CSS files
│ └── styles.css # Main CSS file
├── /js # Folder for JavaScript files (optional)
│ └── script.js # Main JavaScript file (optional)
└── /assets # Folder for fonts, icons, etc.
plaintext
  1. Home Page (index.html):

    • This will be the main landing page of your website. It generally includes a navigation menu, a hero image or banner, and a brief introduction to the website.
  2. About Page (about.html):

    • The About page provides information about you or your website. You can include text, images, and other media to describe the mission, goals, or history.
  3. Contact Page (contact.html):

    • This page typically includes a contact form that visitors can use to reach out. It may also have other contact details like email, phone number, or address.

CSS is used to style your website, making it visually appealing. You’ll want to create a styles.css file and link it to each of your HTML pages. The CSS file will contain styles for layout, colors, fonts, and responsiveness to make your website look good on different devices.

If you want to add interactive features, such as form validation or dynamic content updates, you can use JavaScript. You can include a script.js file, which you link in the HTML pages. For example, JavaScript can be used to show alerts when a user submits a form.