ECS 162 Assignment 1


Category: You will Instantly receive a download link for .zip solution file upon Payment


5/5 - (1 vote)

In this assignment you’ll build a simple homepage for yourself, containing an image and some text. The image can be anything(workplace appropriate); a portrait or selfie would help us get toknow you. Start with a Hello World! page. To download it instead of opening it in the browser, try right-clicking the link.

Add an image. To start with, lets use the image in this filenoFace.jpg. Again, try right-clicking to download the fileinstead of opening it, and put the file into the same directoryas hello.html. Add the image to the Web page using the HTML tag.

Please DO NOT use the height, width, style, or other attributes to set the size of the image. The modern way tohandle these attributes is to use CSS. Do use the “src” attribute to tell the html file what image to use (this iscontent, not appearence). Also use the “alt” attribute toprovide text to display in case the image is unavailable, or for Web browsers for people who can’t see well (alsocontent).

Add a short comment or joke to the image using a “title” attribute for the image element (note: the Web page showsadding a title to the tag and the tag; here wewant to add it to the tag). Check it by openinghello.html in the browser, and moving the cursor over theimage. Do you see your comment or joke pop up near thecursor? This is called a “tool tip”. Add a paragraph containing just your name using the

(paragraph) tag. Put the paragraph after the image, and it will show up underneath on the Web page. Now create a file “hello.css”, which will contain the CSS for Assignment 1

To start, we’ll just color the body of the Webpage. Do this by adding a selector for the body, with a colorattribute: body { background-color: lightgray; } Now connecthello.css to the html file by adding this line to the head of the html document: Re-opening the html, you should see that the background of the page is gray. We’re going to box up the image and the paragraph beneathit in a

element; this will make them stick together as aunit within a larger Web page. In the html, just enclose theimage and paragraph between start and end tags for the div.
In the .css, so that we can see the div, let’s give it a differentbackground color by adding: div { background-color: ivory; }Finally, check that your HTML validates and your CSSvalidates using these links (upload as files).
That’s it! Now go ahead and add your “real” image and tool-tip. Put your own image into the HTML, adjust your tool-tip joke or comment,and then submit a zip file (Linux users may need toinstall the zip command; please don’t give us gzip, it is not thesame thing) on Canvas, containing: Your version of “hello.html” Your version of “hello.css” Your image.
Before submitting, try unzipping the file in a fresh directory, andmake sure you can see the Web page correctly in Chrome. That ishow we will grade it, and if, for instance, the .css file is missing, orin a subdirectory that is not accessible to the .html file, we will take points off. Of course this assignment is only one point…but in the future.