Eclipse is an Integrated Development Environment we will use in this class to create and run Java applets. In general, an IDE is a package in which various tools which the programmer/developer might find useful are integrated to collaborate with each other. The most basic of such IDE can be one with a Compiler, Debugger and a Text Editor. You will learn the definitions and uses of these in future labs.
You will use the text editor provided by eclipse to create a basic HTML webpage.
This lab lets you earn points by making yourself a part of the web with your own home page. If at any point the instructions on this lab sheet do not make perfect sense to you, raise your hand and a TA will save the day.
For future reference, it's a good idea to check your the discussion boards before coming to lab each week. When we notice a common problem in other sections, your TAs may post a message to the discussion board.
Your webpage will look a little dull at this point. based on your readings from the prelab, you should be able to do much better.
(Note that, all the jazzing-up you do should add html tags and text between the two <html> and </html> tags already on your webpage.) You may remove the tags mentioned in the step 12 and replace them with your own, the tags mentioned in those steps are just to ensure you get atleast a basic web-page ONLINE!
Your TAs probably don't write HTML code on a regular basis, so if you have specific questions, like "how do I put a table on my page," the online notes are generally the best spot to look for an answer.
To get full credit, you MUST add a all of the HTML features mentioned below
At least one table . The table may have your weekly schedule or other information.
A hyperlink to the course-webpage.
A picture. You may be able to find your picture in the pictures directory: http://www.cs.duke.edu/courses/fall05/cps001/pictures. This directory is only accessible from Duke IP addresses.
If your picture is in the P:public_html/cps1/ folder your link will be www.duke.edu/~xyz99/cps1/image.jpg where image.jpg should be replaced by the actual name of your picture file and xyz99 should be replaced by your duke id. This is an example of an absolute pathname. In some cases it is considered better to use relative path names. Remember, the image should be stoeed at a place accessible over the internet, i.e. either your public_html folder or some website.
A mail-to hyperlink with your email address.
A hyperlink to a sub-section of your webpage
Change font-colors and background colors (please don't have the same color for both text (font) and the background)
Content!!! (Besides the above technical features, your webpage should have a brief introduction of yourself and a (clean) computer/technology related joke or a Haiku. If you find this on the internet, please remember to include a reference to the source as a hyperlink)
The webpage you created in still inside your IDE workspace. This means, your index.html is stored by eclipse and is accessible only by you. You have to store this webpage in a Webfolder which is accessible to everyone via the internet. All duke ACPUB accounts have a public_html folder by default. This is where you have created your cps1 directory and you need to store your index.html file in this.
You have to export this project from the eclipse workspace to the windows File System. (If all this sounds confusing, just follow the instructions below and you won't have to understand this "workspace" concept as of now.)
You can view your index.html file locally (i.e. via the File
system) by clicking on My Computer on the desktop and choosing
My Computer -> P:
drive -> public_html -> cps1 -> lab1 and then clicking on the index.html file.
To view your webpage via the internet, open a web-browser (ie Internet Explorer , Netscape etc.) and enter the following address in the address bar:
www.duke.edu/~xyz99/cps1/lab1/
Replace xyz99 by your Duke ID. This is how your Lab TAs will view and grade your labs, all of them. They will not be able to see your webpage if you have named it something other than index.html or named the project something else or exported the eclipse lab1 project to a location other than P:\public_html\cps1 . Hence it is required all the students follow a uniform naming scheme.
When you finish changing your page, make sure you saved the final version and then start shutting stuff down. You mostly start hitting the little X's in the upper right-hand corner of each window. If you are about to destroy something important, you will get a warning, so do it carefully. Make absolutely sure you do not leave any windows open! If you do, anyone who walks by feeling malicious can get you in trouble. And that's it. You're done!
LOGOUT OF YOUR MACHINE BEFORE LEAVING THE LAB! (Double-click the Logoff icon on the Desktop)
Cascading style sheets (CSS) are one of the preferred methods for formatting webpages. Style sheets give web developers control over fonts, colors, and layout. The idea is that the document structure (usually written in HTML) should be separate from the document preseentation (in CSS). This separation is useful in adapting pages to the whatever web browser is being used and improving accessibility.
Style sheet syntax is made up of three parts: a selector, a property, and a value in the following order.
For extra credit, create a style sheet for your webpage to do at least the following:
Check the readings from the prelab for more help on HTML.
In addition to the readings, some other things to remember are:
When given a web-address which ends in a folder name like www.duke.edu/~xyz99/cps1 (where cps1 can be any folder), by default the browser looks for an html page named "index.html" so make sure you have named your file correctly. (All letters should be lower-case)
If you want to name your html page something other than "index.html" then the path to that page should be given with the name of the page included.
e.g.: www.duke.edu/~xyz99/cps1/not_named_index.html
Also, the address to your web-folder (which is your public_html folder) is www.duke.edu/~xyz99/ . Although, you might choose to have a lot of folders and data on your ACPUB account (which is ~ 70 MB for me, I think�, only the files/folders which you create or copy into the public_html folder will be accessible over the internet.
This being an introduction to HTML, we have used a bare-bones approach to creating html webpages. In future, like your TAs, you will find it much more convenient to create HTML documents using some proprietary software specifically meant for creating webpages. The most common of which are MS FrontPage and Dreamweaver.
Siddhesh Sarvankar ( siddhesh@cs.duke.edu )