User Tools

Site Tools


Sidebar

projects

wcp1 (due 20240124)
pct0 (bonus; due 20240125)
pct1 (bonus; due 20240125)
abc0 (due 20240131)
pct2 (due 20240131)
wcp2 (due 20240131)
dac0 (due 20240207)
pct3 (bonus; due 20240207)
wcp3 (due 20240207)
gtf0 (due 20240214)
pct4 (due 20240214)
wcp4 (due 20240214)
bwp1 (bonus; due 20240228)
pct5 (bonus; due 20240228)
usr0 (due 20240228)
wcp5 (due 20240228)
gfo0 (due 20240306)
pct6 (due 20240306)
tpb0 (due 20240306)
wcp6 (due 20240306)
pct7 (bonus; due 20240313)
tpb1 (due 20240313)
wcp7 (due 20240313)
pct8 (due 20240320)
tpb2 (due 20240320)
wcp8 (due 20240320)
pct9 (bonus; due 20240327)
wcp9 (due 20240327)
bwp2 (bonus; due 20240410)
fwg0 (due 20240410)
gfo1 (due 20240410)
pctA (due 20240410)
wcpA (due 20240410)
wpa0 (due 20240410)
pctB (bonus; due 20240417)
upf0 (due 20240417)
wcpB (due 20240417)
ldg0 (due 20240424)
pctC (due 20240424)
wcpC (due 20240424)
pctD (bonus; due 20240501)
wcpD (bonus; due 20240501)
gfo2 (due 20240508)
pctE (bonus; due 20240508)
wcpE (bonus; due 20240508)
EoCE (due 20240516)
haas:spring2024:unix:cs:cs5


Corning Community College

UNIX/Linux Fundamentals


Case Study 0x5: Web Pages

~~TOC~~

Objective

To get an introduction to HTML and to manage web space.

Background

HTML (HyperText Markup Language) documents are tag-oriented, meaning that you use tags to perform the various operations that are available to you. Below is a table of common tags we are going to be using in this case study:

Opening Tag Closing Tag Description
< html> < /html> start and end of HTML document (required)
<title> </title> text to be displayed on title bar of browser window.
<body> </body> bulk of HTML document. (required)
<strong> </strong> Bold all text between the tags
<center> </center> Center all text between the tags
<em> </em> emphasize all text between the tags
<p> </p> start a new paragraph
<br /> none needed force a line break
<hr /> none needed draw a horizontal bar
<ul> </ul> Unordered list
<ol> </ol> Ordered list
<li> </li> bullet in the list

A good rule of thumb is that, for the most part, where there is an opening tag you will need a closing tag. Most browsers will render improperly designed pages, but it is better to stick to the rules and make your HTML as clean as possible.

Managing Web Space

Every home directory on Lab46 has a public_html/ subdirectory. This is where the web server looks for user HTML files. Files contained in here can be accessed via HTTP.

The addressing scheme is as follows: http://lab46.corning-cc.edu/~username/file.html

Where username is your Lab46 username.

NOTE: remember the tilde! It is very important

The name of the default document should be index.html, which if used doesn't need to be explicitly specified in the line above.

In order for your web page to be available to the world, it needs world read access. So make sure all web pages you want to make available have the proper permissions. Same with your public_html directory– it needs at least world execute access to work.

NOTE: If using vim to play with your web pages you do not see the actual HTML tags, tell vim to display them: CTRL-W then press d

Exercise

Time to play with HTML and create some web pages:

1. Copy the cs.html file from the web/ directory in the UNIX Public Directory (/var/public/unix) to your public_html/ directory and do the following:
a.View it in a web browser to confirm that the permissions are properly set and that you have got your URL correct.
b.Edit cs.html and change some things around and re-view it in a web browser (you may have to use the refresh button)
c.What is the URL of your modified cs.html file?

NOTE: To perform the file copy, do the following:

lab46:~$ cp /var/public/unix/web/cs.html ~/public_html/
lab46:~$ 

And change into your public_html/ directory:

lab46:~$ cd public_html
lab46:~/public_html$ 
2. Make another copy of cs.html and call it ex0.html; and do the following:
a.Change the unordered list to an ordered one.
b.Make a list of 5 things.
c.Change the title of the document appropriately.
d.What is the URL of your ex0.html file?

NOTE: To make the copy, perform the following command:

lab46:~/public_html$ cp cs.html ex0.html
lab46:~/public_html$ 
3. From scratch and in a text editor (nano) create your Lab46 homepage with the following items:
a.A unique title.
b.Put your name on the page somewhere.
c.Who are you? Define yourself, your interests, your skills, I want to see YOU in your web page.
d.Use at least 1 instance of centered text.
e.Have a picture of yourself on your page.
f.Use at least 1 instance of bolded text.
g.Use at least 1 instance of emphasized text.
h.Make a top 5 list of something. (or make use of a list)
i.Make use of paragraphs, line breaks, and horizontal rules
j.Put a joke, something interesting you learned in UNIX this semester, or some thought-provoking phrase on your web page.
k.What is the URL of your Lab46 homepage?

Conclusions

This assignment has activities which you should tend to- document/summarize knowledge learned on your Opus.

As always, the class mailing list and class IRC channel are available for assistance, but not answers.

haas/spring2024/unix/cs/cs5.txt · Last modified: 2013/09/30 16:41 by 127.0.0.1