Making your webpage into a website
You all should have already learned how to create links using the a href tag. This tag is used to link to other pages within the site as well as to pages elsewhere on the web. In order to create more files and pages, you will have to know basic UNIX commands. If you are still unfamiliar with these commands after we are finished or would just like more information, you can visit the UNIX commands page on this site.
When entering a UNIX shell you should see the familiar dimacs (lunar/av) 2% prompt.
Here you may type in the list command ls.
dimacs 2% ls
The ls command lists the directories and files in your root directory. You should see a public_html directory. At the dimacs 2% prompt you can type in the change directory or cd command to access this directory.
dimacs 2% cd public_html
You should now be in your public_html directory. If you were to use the ls command at the prompt you would see the index.html file (which is your title page) and directories for images, etc. You may want to create different files or pages for your site. New files can be created by typing the emacs (or edit) command and the name of the file you would like to create. Files written in HTML must be saved with an html file type. The file name will be used in the URL or web address. So if you called the file fun.html, the URL address would be
dimacs 2% emacs fun.html
Emacs is a UNIX text editor with which you can create and edit files. After you have finished working with a file you should always save it. At the top of the browser you will see Buffers File Edit Help. Click on File and select Save buffer. You can now exit out of emacs by again choosing File and selecting Exit emacs.
Now that you have created a file, the permissions have to be changed so it can be viewed on a browser. Let's use the fun.html file as an example. At the prompt we have to use the change mode or chmod command. There are two ways you can change mode. You can use the number commands or you can use the letter commands.
Numbers: chmod 644 (for files); chmod 755 (for directories)
Letters: chmod a+r (for files and directories)
dimacs 2% chmod 644 fun.html
dimacs 2% chmod a+r fun.html
Now your page can be read.
You can now create multiple pages and links for your site. However, remember to link these pages to your main (or index.html) page. These hyperlinks can be anywhere on your site. For example, say from our index.html (title page) we want to create a link to fun.html. The correct HTML format for the link would be
Hopefully this site has helped you and given you information on how to build your own new wonderful website.
Back to main page