FIT
100
LAB
3: Constructing HTML Documents
Autumn
2001
Required
·
Chapter
4 of the FIT course pack
·
The
following help files, written by Eric Riley, MLIS
o
General
HTML Help
Additional
helpful references for Lab 3:
·
Chapters
1 - 8 and Appendices A-D
of the HTML For The World Wide Web
o
http://www.w3schools.org/
Click on the
The first 2 labs introduced the Dante account and navigating file structures. Today is an introduction to HTML and how to create HTML documents to publish to your web site.
You should already have your email account and Student web page enabled. See the Workshop instructions if you need to do so.
public_html is the name given to the folder placed in every student’s remote account on Dante once they have enabled web publishing. It is a directory space where you publish your website and is provided to you by the University. All files that you wish to see up on your web page at the UW must be placed inside of this folder. If those files are not in this folder, then they cannot be seen by someone browsing the Internet and looking at your web site. The web documents that you create today and in the future are sent to this folder using the SSH file transfer client.
Have you ever used Notepad before? It is a simple text editor that comes with Windows. To open it, click on the Start button, then go to Programs, Accessories, (Start>Programs>Accessories) and click on the Notepad entry. You will be presented with a blank window and a flashing cursor in the top left corner.
·
Open and close tags to indicate
HTML as the markup language. Remember, all tags in HTML are identified
with these angle bracket symbols <tag>. So to start your HTML document, the first
tags you will enter will be ones that tell the browser that this page is to be
interpreted using Hyper Text Markup Language:
<html>
Put all other tags and text in-between the HTML beginning and ending tag.
</html>
· Head tags that also include a title tag (with a title for your page. ex. Web page for Lab 3!). Make sure to close the head and title tags.
<head><title>My
Lab 3 Webpage</title></head>
· Just below the </head> tag and above the </html> tag, add in the body tags that will include the bulk of your content
<body>
This is my first web page for FIT 100!
</body>
When you are putting together web pages, or writing code for a program, a good way to keep track of what you do is to make one change and then check to see if it is working.
Save what you have done up to this point and then open
the file in a web browser to see if it works.
Checking as you go is the first step in learning how to debug.
You should see the title of your Web page displayed in the top-left corner of the browser window and a single line of text in the content window.
Each time you make changes to your
file and save them, you will need to press the Refresh, or Reload button on
your browser so that your new changes will appear.
Your code so far will look something like this:
<html>
<head><title>My
Lab 3 Webpage</title></head>
<body>
This is my first web page for FIT 100!
</body>
</html>
o
A welcome sentence using an H1 or
H2 tag.
(Heading 1 and Heading 2 are tags that will display your text in a certain size,
they have an open and close to them).
o A line (horizontal rule) following the tag to separate the header information from the following paragraph.
Frequently save and check your work!
Your motto should be:
Save early, save often, make a
backup!
Check to see what you html file looks like in the Web
Browser window.
o A paragraph tag.
§ Include a short description of yourself and why you are in this class.
§ Make part of the paragraph bold
§ Make another part italicized
§ Underline a third part
o Create an ordered (numbered) list of your favorite colors
o Now, use the font tags to make one of the color names the appropriate color.
§ You will need to use either Hexidecimal or RGB color codes. Here are two links to web pages that give you the codes for colors:
http://www.w3schools.com/html/html_colors.asp
http://www.geocities.com/SiliconValley/Network/2397/
o Create an unordered (bulleted) list of your favorite foods.
o
Using the anchor tag, add in the
following three links, or three of your favorite links:
§ http://courses.washington.edu/gbw/fit100
Give names to the links that will properly identify them on your page.
***Make sure you put in
closing tags in the appropriate places.***
***You can use images located at
this URL:
http://faculty.washington.edu/gbwhit23/100Labs/Lab3
OR go out on the Web and find your
own ***
To grab the full-size photo, not the thumbnail:
NOTE: You will need to select “All Files” from the Files of type menu in order to view your HTML file in the window.
<img src=”image_file_name”> tag
· When you FTP your Web document over to your Dante account, be sure to transfer your image(s) as well, or they won’t be display.
· Realize that the security of the FTP client that we now use, Secure Shell, will change the permissions on the files that you transfer into your public_html.
· By default, all file permissions are changed to Owner read and write only.
· Select the file, Lab3.html, from the right side of the FTP window. Right click and select Properties:
· You will need to change the properties of every file you FTP into your public_html folder and give Read permissions to Group and Other:
·
http://students.washington.edu/your_uw_id/Lab3.html
· URL addresses are case sensitive. If you use capital letters in your file name, they need to be capitalized in the URL.
Default web pages, or home pages, are usually a way to indicate the very top level of your web site. However, every folder within your web site can also have a default page. At the UW, the name given to default web pages within a directory is index.htm or index.html. Other web servers have different names, such as default.html or default.asp, etc. So, if you want a particular page to come up automatically when someone enters the URL to your site:
http://students.washington.edu/your_uw_id/
then you must place an HTML document in your public_html folder called index.html.
When you created your account here at the UW, an index page was created automatically for you. Until you add to that page, or replace it with an index page of your own, it will serve as your default home page.
For every folder (directory) you create inside of your public_html account, you have the option of placing an index document to serve as the default page when that folder is opened. The page that comes up when you enter this address:
http://faculty.washington.edu/gbwhit23/100Labs/Lab3/
is named index.htm.
You would see the same page if you were to type in the full path name:
http://faculty.washington.edu/gbwhit23/100Labs/Lab3/index.htm
It acts as the default web page for the directory Lab3.
If you go to this address:
http://faculty.washington.edu/gbwhit23/100Labs/
you see only a listing of all folders and files in that directory comes up. There is no index.htm or index.html page in this directory to act as the default.
Some helpful pages for learning HTML:
W3 Schools:
UW CSE HTML help page:
http://www.cs.washington.edu/education/courses/100/99au/webref.htm
Some helpful pages for color codes: