How To Homepage: easy website guide

What is HTML?

Relative paths

A relative path refers to the location of another file relative to the location of the file you're already at. You might use these while linking inside of your own website (these are internal links).

Four folders. The main folder, titled homepage, has one file, aiueo.php, and two folders, hp_1 and hp_3. hp_1 has two files, aiueo.php and the current HTML file, and one folder, hp_2, which has one file, akasatana.php. The folder hp_3 has one file, irohani.php.

Please look at the diagram above. Let's say the red file is the one we are linking from.

First, let's imagine we want to link to aiueo.php.

In this case, "aiueo.php" is in the same folder as the current file, "hp_1". All we have to do is say its name:

<a href="aiueo">

This will point a browser straight to the right file. (This "a href=link" thing is the HTML tag you add when you want to make a link, but don't worry about that for now.)

Second, let's imagine we want to link to akasatana.php.

In this case, "akasatana.php" is in a folder called "hp_2". We need to tell the browser where to go:

<a href="hp2/akasatana">

To be clear, if you want to link to a folder inside a folder, you can keep telling it that by separating the names with slashes: hp_2/hp_4/...

Next, let's imagine we want to link to abcde.php.

In this case, "abcde.php" is in a folder that comes before our current page. We need to tell the browser to go up a level by writing ../:

<a href="../abcde">

If you want to go up two levels, you can try ../../, or alternatively try increasing the number of dots, like .../, and so on.

Finally, let's imagine we want to link to irohani.php.

This might be confusing. In this case, "irohani.php" is up one level and down another folder. Can you figure out how to tell the computer to go here? It's something like this:

<a href="../hp_3/irohani">

So we've gone up one level, and then down into our folder, and finally opener our file.

Did you understand that? In these examples, we're talking about linking to other HTML files, but the same rules apply for linking to images and other files.

Absolute paths

An absolute path lets everybody know where something is located. It's completely one-of-a-kind and leads directly to the spot it's talking about no matter what file it's written in.

A simple example is the address, or URL, of a website. You will usually use this kind of link to point to other websites which are run by other people, or links of your own (such as a guestbook you moderate, or your social media profile) that are located outside of your homepage.

For example, to link here,

<a href="https://mouseling.net/howtohomepage/">

that's what you would have to type. The https: part tells the browser it is about to go to another website, the //mouseling.net part tells the browser what website it is going to, and the /howtohomepage/ part tells it to check out the folder named "howtohomepage", where this tutorial site is located.

If there are other websites you like, please link to them on your own!