CSC128: Introduction to Linux

Making a Web Site on a Unix/Linux server


User web pages are typically held in ~username/public_html. This is also referred to as $HOME/public_html. Check it out for yourself, you have a web page in your public_html directory. You can view your web page by entering[username]. The file that you have is called index.html . The index.html must be publically viewable (chmod 644 index.html). Remember also that the directory, public_html must have read and execute permissions set on it to allow the web server (the web server comes into your directory as a member of the 'other' group) to enter your directory to find the file to serve to the world.


All web pages have the following code in them, it is written in regular text using vi. You may have to use vim index.html to make the html tags viewable. (many of you are actually running the elvis editor when you type vi.



The page title goes here

</head >

The body of the web page goes here. 
Notice that most html tags that you use need to be 
coupled with their corresponding /html end of tag slash.


Viewing web page sources

You can view the source of any web page that you surf to, since you have already downloaded it. In Netscape or Mozilla just choose VIEW-SOURCE, and you can see what the page author has placed in the page for your viewing.

HTML tags

There is a lot of information on the web about writing HTML. a good source is: HTML Cross Reference.

Document type Definitions

All truly legitmate production pages should have a DTD in them. The document type definition tells all of the different browsers out there what type of encoding you are using. A current DTD looks like this:
and it the very first line of a web page.


The W3C is the body that governs what comes into currently accepted standard HTML and what HTML tags are depreciated. You should go to W3C to find out about current standards of the HTML language. You should also run the HTML Validator against your page to see if it is correct html.