For this lab you will create a simple web page containing most of the basic HTML elements, including pictures, lists and hyperlinks. After completing this lab you will have become familiar with the HTML markup language, using FTP clients and setting file permissions in a UNIX environment.
Your web page must include five of these these elements:
login:prompt will appear.
enter
password:prompt will now appear
enter
u UNIXoption from the umenu system
bulldog3.d.umn.edu%
lsfollowed by enter at the command line.
mkdir www
chmod 755 www
exitto leave the UNIX system
Your account is now ready to receive HTML files for your website.
To create a web page we will use the NOTEPAD program. You can find this program under the Start->Program Files->Accessories menu. When you open the program, you should be presented with a blank page.
The Fundamental Parts of a Web Page
A web page has 3 main parts
Each of these sections are delimited by tags. A tag is some word enclosed within a set of brackets (<>). The tages for each of these sections are
HTML Section
This is the first part of your web site and is required. In your blank document type
<HTML> </HTML>Your web page is going to be defined by what you place between the starting and ending HTML tag.
HEAD and BODY Sections
Move your cursor to the left of the closing HTML tag and type
<HEAD> </HEAD> <BODY> </BODY>Your document should now have the HEAD and BODY tags enclosed within the HTML tags. You have now created a bare minimum web page. If you upload this page to your school account and view it in a web browser you will see a blank page. Not very interesting.
Now you need to add content within the HEAD and BODY subsection. The various tags you will need to use are described in the section "HTML Tags" below. Once you have written your web page, you will need to save it to your data disk before uploading it.
A more detained reference to HTML tags may be found at www.htmlhelp.com/reference/html40/olist.html
Now that you have created your web page, you will need to upload it, along with any pictures, to your account on bulldog or ub. To do this, we will use the WS_FTP client which can be found on all lab machines. To upload your files, follow the following sequence.
Once your webpage is visibly in the web browser, print out a copy and turn it in. The webpage should have 5 of 7 optional elements and all the required elements clearly visible. Make sure your name appears on the web page as well. Turn it in with a cover sheet as usual.
These are the tags you will need to learn about to implement each of the options above.
The title tag,
<TITLE>Your title</TITLE>The TITLE tags can only appear within the HEAD subsection, all other tags must appear within the BODY subsection.
Images
The image tag,
<IMG SRC="filename">to add a picture to your web page.
Links
The anchor tag,
<A HREF="web address"> link text </A>adds a link to the website web address where the link is the connected to the text link text
Lists
The ordered and unordered list tags,
<UL>, </UL>Allows you to create a bulleted list or a numbered list of items. You start with <UL> or <OL> and then list each of the items you want to appear in the text. To get a new bullet or number you add the list item tag
<OL>, </OL>
<LI>followed by the text you want to go with that tag. The list item tag does not need a closing tag. Once you are done with the list you add the appropriate ending tag (either </UL> or </OL> depending on what you started the list with).
Align
The divide tag can be used to align the following items to the left
<DIV ALIGN=LEFT>right
<DIV ALIGN=RIGHT>or center
<DIV ALIGN=CENTER>
Headers
The header tags,
<Hn>your text</Hn>where n is 1, 2, 3, 4, 5 or 6 creates a section header. The closer the number is to 1, the larger the text will be.
Rulers
The horizontal rule tag,
<HR>draws a horizontal line across the page (see the top of this document).
Colors
Use the font tag to change the attributes of the text. Simply use
<FONT COLOR=#color>your colored text</FONT>to color the text "your colored text".
Just include your name and the class name as regular text within the page. No special formatting or use of HTML tags is needed for this part.
Title
You should set up an appropriate title tag,
<TITLE>your page title</TITLE>where your page title should be appropriate for your web page.
Use the anchor tage as described above, but substitute your email address (somebody@somewhere.edu) for "web address".
This is an absolute bare-bones HTML file. You may use it as a starting point or as a check against your own work.
<HTML> <HEAD> <TITLE></TITLE> </HEAD> <BODY> </BODY> </HTML>
Click on this link to view a page which contains all of the elements we have talked about. You can see the HTML code by chosing Edit->View Source in you web browser.
Q: I don't know what my "login name" is!
A: Your login name should be identical to your email name. The part
before the '@' in
Q: I don't know what my password is!
A: Your password is the same one you use when checking your email. If you
have never checked you email on the university system before, you will
need to go to the Library and get a temporary password there.
Q: I get a message saying "Forbidden" and that I don't have permissions to
access the file in my web browser when I try to access my webpage
A: You do not have your permission set correctly. Even though it is your
file, when a web browser attempts to load it, the browser appears as
"somebody else". To set the proper permissions, move to your web
directory by typing
followed by a return on the UNIX command line. Now change the
permissions on the file "index.html" by typing
followed by a return.
Also, the directory "www" my have proper permissions set as well. If
changing the permissions on the file "index.html" does not solve the
problem, move to your home directory by typing
followed by a return in the UNIX command line. Now type
followed by return. All you permissions should now be set properly.
Q: My webpage loads, but my pictures do not
A: First check that you have spelled the names of you pictures properly in
your <IMG> tags. If they are misspelled, then the web browser will not be able to locate them.
Secondly, the permissions on the pictures may be incorrect. To fix
this, follow the instructions above for setting correct permissions on
the "index.html" file, but substitute your picture's filename for
"index.html"
Alternately, you can set all the file permissions at the same time with
only one command. First move to your web directory by typing
followed by a return on the UNIX command line. Now type
followed by a return. This will give everybody permission to read all
your files (but not delete them!) in the web directory.
Q: Only part of my webpage shows up and I know I've typed everything in!
A: Make sure that you have closed all of your brackets. Every '<' must
have a matching '>'. Also, some tags require a closing tag (which is
different than closing brackets). for instance, the Bold tag, <B>,
needs a closing tag, </B>, to know when to turn off bold text. Every
closing tag is the same as the opening tag except with the character
'/' prepended.
Check the online HTML guide to check if your tags require a closing
tag.
Official HTML 4.01 specification:
Quick List of web tags:
cd ~/www
chmod 644 index.html
cd
chmod 755 www
cd ~/www
chmod a+r *
chmod a+r *
| ||| |
| ||| +- match all the files
| ||+--- (r)ead permission
| |+---- add this permission to the files
| +----- grant to (a)ll users
+--------- (ch)ange the (mod)ification flags
http://www.w3.org/TR/html401/
http://www.htmlhelp.com/reference/html40/olist.html