Create Subpage in html

You'll need to create new HTML files called faq.html and contact.html for this instance. Then you can link to these pages with <a> tags.

EDIT
After half a decade, this answer has started getting upvotes, while not being as complete as the longer answer here. Here are some more details:

When you create extra HTML files and visit them, you'll see that the URL also contains the .html-part. This is something most people don't want. Provided you're using a webserver (either local or with a third-party host), there are multiple ways to get rid of the extension — one of which doesn't require server-side scripts and has been documented in Stephen's comment below.

What you do, is you add folders with the appropiate names (faq, contact, etc.). Once you have the folders set up, all you have to do is put index files inside them (index.html). Those index files should contain the content for their respective parent folders.

In essence, this is repeating the process with which the root location of a website is created, but for subfolders. You see, oftentimes you start out with a root folder called public_html, in which there is a single index file. Webservers automatically serve index files:

public_html/index.html     -> example.com/index.html
                           -> example.com/

public_html/faq/index.html -> example.com/faq/index.html
                           -> example.com/faq/  ←  😎

As you can see, when done, you can visit

www.example.com/faq

Instead of

www.example.com/faq/index.html

Just like how you can visit

www.example.com

Instead of

www.example.com/index.html

If you feel like you want more fine-grained control, you're better off using server-side scripts. Whatever server language you use, you are in total control over where people navigate and what they get to see, no matter what the request looks like.

If you're using an Apache server, you can take a look at what an .htaccess file is, though writing and debugging them is arduous IMO.


This depends entirely on your web server. Your webserver is responsible for routing URL paths to the actual content to display. However, if you just have static HTML files (professional websites tend to have HTML templates in some templating language that gets filled in with data from databases and other sources using some server-side programming language and a templating engine), most web servers will, using the default configuration, route a subpath to the "index.html" file in a directory of the same name as the path. However, this is something that does vary from web server to web server and from configuration to configuration.

In other words, for a simple website, this will usually suffice:

website_folder/
   index.html <- this is the homepage
   faq/
     index.html <- this is served from "/faq" and from "/faq/index.html"
   contact/
     index.html <- this is served from "/contact" and "/contact/index.html"

However, for a professional website, you'll find something like this to be more common:

website_folder/
  templates/
    homepage.tpl <- an HTML template in some templating system.
    faq.tpl         Examples of templating engines include Jinja2,
    contact.tpl     Django, CTemplate, though there are many, many others
  static/
  config/
  lib/
  src/
  ...

Where the webserver program (in this case I'm assuming it's under "src", but the exact organization of the code varies widely from one company to another or from one project to another) registers handlers for these different paths and the handlers are programmed to fill the corresponding templates.