Sep. 1, 2011
You should go through the HTMl Tutorial here written by Sam Slee.
Other Tutorials for your reference are:
Last time you created a folder on your laptop called "compsci4" to store your work in this class. Inside that folder create a new folder for each days work. For today create a folder called "animalpages".
Now use "notepad" to start a new file. (If you are on a mac use "textedit" and see the Resource page about this under "Editing a .html file".)
Using notepad, create a web page named animal.html with the modifications that follow.
You could type or cut and paste the following example into your empty animal.html file. The html tags must be first and last, the head tags go around the heading and the body tags go around the body of the web page.
Decide on an animal to write about. Replace "Your animal here" between the title tags shown above (they appear in the heading) with the name of your animal, such as "Beaver".
Save the file in your animalpages folder.
After typing this all in, look at your animal.html web page using Internet Explorer (IE) to see if it looks ok. In IE, select "File", "Open", "Browse" and go to your animalpages folder and select animal.html to view.
If you had chosen the animal "beaver" then your web page will look similar to the following. Note the two items circled in red, the title at the top "CompSci 4: Beaver" and the body has the phrase "body here".
Note: After each step, make sure you save animal.html, and then look at with a browser to see if your modifications were done correctly.
put stuff here
Use the "image" html command to put the image in your document centered. Look at it via your browser to make sure it is displayed.
Next include a link so that clicking on this image takes you to the Compsci 4 main web page.
Using your browser and a search engine, search for a picture of your animal that you like, save it and put it on your web page.
If you want to modify the picture (such as crop it) then you can open up Paint (under programs, then accessories), modify it, save it and then put the modified picture on your web page.
How does Prof. Rodger (or anyone else) do her web page? Sometimes it is useful to copy html from someone else. In fact I rarely start a new web page from scratch, but rather copy an existing web page, and remove the stuff I don't want, and then add to it.
You can see the html source that was used to create this web page. At the top of your browser, click on View, and then Source and a separate window pops up showing you the html for this page.
Note: This doesn't always work well. If the person used a tool such as dreamweaver or frontpage to create the web page, view source doesn't help much as they put so much html into the page that it is difficult to figure out.
Before you leave class, you should copy your work over to your Duke web space. If you are working with a partner, you should both copy it over.
You will put these files in a directory on your account that will be viewable by others on the World Wide Web. Make sure you copy all the files in your animalpages folder (if you don't copy the images, they won't show up!).
DON'T USE Blanks in names of folders! They work, but make it harder to see the URL.
Note that the first class period in your Duke space you found the folder public_html and already created a folder compsci4 in it, and a folder named webpages in the compsci4 folder. You will put these files also in the webpages folder.
You can use webfiles.duke.edu to transfer the files over OR you can use a file transfer program you can get from OIT.
This describes a file transfer program.
If you don't finish this assignment in class, you should finish it for homework, and complete it by the time assignment 2 is due. Do not turn it in. We will just look for it on your web page when we grade assignment 2.
Once you do assignment 2 (due next week), you should both link to the animal.html page you created for this classwork.
If you want to learn how style sheets work, check out this other tutorial: HTMl CSS Tutorial written by Sam Slee.