CS006: Lab 2
Multi-Web Page Personal Website
In lab 2 students will develop a Multi-Web Page Personal Website. Each web page will share a similar structure and layout. Semantic HTML elements such as header, main, section, nav, and footer will form the basic structure of the website. The intended audience are potential employers, college professors, classmates, and prospective colleagues. The four page website includes a homepage, index.html, with content about the student’s interests and background. In addition there is an academics.html web page with listed coursework, a professional.html with simple resume, and personal.html with bucket list and goals from lab 1.
1.1 Create lab 1 folder
1. Login to your AWS account: Use Google Chrome only.
https://959097940486.signin.aws.amazon.com/console
2. Open Cloud9 in AWS. Locate your home folder:
● The home folder (aka root directory) name has the same name as the AWS environment you created when signing up for AWS.
● The home folder’s name consists of cs006_fall23_ (lowercase c, lowercase s, zero, zero, 6, underscore, lowercase w, lowercase i, lowercase n, 2, 3, underscore) then your NetID in all lowercase (no spaces in between).
● For example, if your NetID was kflynn001, then the environment name will be cs006_fall23_kflynn001.
● All of your individual lab folders will be created inside of your home folder.
● We will use a slightly different folder naming convention for the lab 1 folder we will create in the next step.
3. Create a New Folder - Select your home folder. On Windows first right-click, for a Mac press and hold down two fingers on the trackpad, until a drop down menu opens. From the menu click on New Folder. A new folder will be created inside of your home folder (environment).
4. Rename New Folder - Select the New Folder (same way as previous step). From the menu click on Rename. This will highlight the folder’s name. Rename the new folder as follows. Your lab 1 folder name should be your NetID followed by an underscore ‘_’ followed by lab1 followed by an underscore ‘_’ followed by your lecture section number in the format section001, section002, or section003. Below are meeting times for all sections.
Section Number |
Days & Time |
001 |
MWF 8:00-8:50 AM |
002 |
MWF 10:00-10:50 AM |
003 |
MWF 12:00-12:50 PM |
Example - If your NetID was klynn001 then your lab 1 folder name would be one of the following based on your lecture section.
kflynn001_lab2_section001, kflynn001_lab2_section002, or kflynn001_lab2_section003.
1. Download - There are no starter files for this lab. Students will create an index.html from scratch. Then create the other webpages by duplicating a portion of index.html.
2. Upload - There are no starter files to upload to AWS Cloud9. Proceed to the next section, 1.2 Homepage.
1.2 Homepage
1. In your lab 2 folder (for example, kflynn001_lab2_section001), create an HTML file named index.html. The index.html file is commonly used to represent the home page of a website.
2. Open index.html in edit mode in Cloud9.
3. Add on line 1 in index.html. , the Document Type Declaration, specifies to the browser that the document is written in HTML5.
4. Addon line 2 of index.html.
5. Place your cursor in between the opening and closing html tags:here. Then press the return key once, moving the closingtag down two lines. Thetag marks the beginning of the HTML document.
6. Addinside the html element:here.
7. Place your cursor in between the opening and closing head tags:here. Then press the return key once, moving the closingtag down two lines in the code.
Thetag marks the document head. The head element contains information that describes the web page document. It also includes information browsers will use to properly display the web page.
8. Addinside the html element after the head element,after head element here. The body element should be placed after the entire head element, that is after closingtag and before closingtag.
9. Place your cursor in between the opening and closing body tags:here. Then press the return key once, moving the closingtag down two lines in the code.
10. Add (copy-and-paste the entire line of code) the followingelement with the given attribute values insidehere.
|
11. If you correctly followed the directions for steps 1-10, the index.html source code should appear as follows.
index.html: add,,, and to
1. Add
insidehere. The header element is a structural element that contains content such as a navigation menu.
2. Add
inside the body element:after header element here. The header and main elements will be in sequence in the document, i.e. header element occurs first followed by the main element. The main element contains information considered the central part of the webpage content.
3. Add four
elements insidehere. Using your cursor and the return key, add a new blank line between each openingtag and closingtag. Once done there should be 4 section elements in a row.
4. Add
after the closing tag for element and before the closing tag.
5. Place your cursor in between the opening and closing footer tags:
here. Then press the return key once, moving the closing tag down two lines in the code.
6. If you correctly followed the directions for steps 1-6, the index.html source code should appear as in the image above.
index.html: About Me, My Hometown, Interests and Hobbies and UCR
1. Add a paragraph element,, inside the first section element,
here.
2. In the paragraph element from the previous step, write a single paragraph about yourself. Start the paragraph with the text About Me: in bold. We could use the element to make the text bold, but to make our website more accessible we will use the element. The HTML element indicates that its contents have strong importance, seriousness, or urgency. For users who are visually impaired or use text-to-speech software to navigate and read webpages, indicates this content is important: which content about you is. Read more about its use here. https://developer.mozilla.org/en-US/docs/Web/HTML/Element/strong.
3. To complete the paragraph content, at a minimum, you should answer the following questions. The answers to which will form the paragraph’s content.
What is your name, major, year in college? What year and quarter did you start at UCR? Where did you attend high school? What are your plans after you graduate career-wise? Phrase each plan as a positive affirmation , examples are: I will enter graduate school in ______. I am going to attend law school, then enter criminal law. When I earn my teaching credential, I will become a HS teacher. I will enter the industry as a(n) _______. I will work as a Congressional aid, then run for political office. I am going to work as a social worker in LA County. Points will be deducted for not using positive affirmation. Avoid “want to” or “hope to” or “if...then”.
4. Add a heading level 2 element,
Hometown
, inside the second section element,here.
5. Add one paragraph element, , this section element:
here after h2 element. Next, write one paragraph of content about where you grew up, your hometown or a recent place you call home.
What did you love the most about this place? Be specific. What were some of your fondest memories of this place? What was the best of the food and culture like? Were there particular seasons of the year that you enjoyed the most and why? What were some of the cool places you would go or experience growing up?
6. Add a heading level 2 element,
Interests and Hobbies
, inside the third section element:here.
7. Add one paragraph element, , this section element:
here after h2 element. Next, write one paragraph of content about your favorite hobbies or interests you have.
Examples are: sport you love to play and/or follow or a musical instrument you learned to play. Do you often hike or spend time in the great outdoors? Do you love to cook? Is there a particular cuisine you are an expert at cooking (eating :-))? Any topic you choose that you are passionate about will work for this section.
8. Add a heading level 2 element,
UCR
, inside the fourth section element:here.
9. Add one element to this section element:
here after h2 element. Add one paragraph of content about your time at UCR. If you have not yet been on campus, do some research online and consider what activities or experiences you look forward to once you get to UCR.
What interesting places or activities have you added to your repertoire or want to experience as a Highlander? Describe several. Examples would be: hiking to the C, eating Pho' with friends, snowboarding, visiting the Botanical Gardens, trips to the beach, nights out dancing in LA with friends, etc.
10. Save index.html and open in Preview Mode in Cloud9. Your webpage should look like the example web page (next page of this document), but with different text for the paragraphs in About Me: My Hometown, Interests and Hobbies, and UC Riverside.
index.html: add ,
to
1. Add an image element, , to the header element:
here. The element should be similar to below, with different attribute values for src, alt, width, and height:
2. Upload an image of scenery in landscape orientation (much wider than high). Search online if needed. Make sure you do not upload an image larger than 1500 pixels wide.
3. Add a heading level 1 element,
Firstname Lastname: Homepage
, after the image element in the header. Replace the Firstname and Lastname with your name.
4. Resize image - open (double click filename) image file in Cloud9’s image editor (see below). Select "Resize" in the edit window menu. Next, change the width value to 1024 pixels. Be sure the “Maintain Aspect Ratio” box is checked, so the height is changed automatically and in proportion to 1024. Save your image file (File->Save, or Command-S on Mac, or Control-S on
Windows). Fill in correct width and height values in the element in your code.
5. Save and open index.html in Preview mode in Cloud9. Your web page should look like the following example with different images and text.
index.html: addto
1. Add a navigation element,
, element to header element:here after h1 element. We will be adding hyperlinks to the. Thewill serve as the enclosing element (similar to an ordered or unordered list). The items inside of...<.nav> will be a list of links.
2. After the
opening tag (inside nav element) add the following hyperlink:
3. On the next line add the hyperlink: ACADEMICS
4. On the next line add the hyperlink: PROFESSIONAL
5. On the next line add the hyperlink: PERSONAL
6. Open index.html in Preview mode in Cloud9. Your file should be similar in appearance as the image below.
1. Add a mailto: hyperlink inside the footer element,
here. The content should be your name. The link should open an email client when clicked on.
Notice that the anchor, , element’s href attribute has a value set to an email address rather than a web page address or file path location.
2. Change email address to have your NetID instead of “kflynn001” in the mailto: href.
3. Add a line break element,
, after the mailto: hyperlink .
4. Add a tel: hyperlink inside the footer element after the previous
,
after here. The displayed linked text for the number should be: (951) 555-5555. The link should open the phone client on the device the link is accessed on.
5. Add a line break element,
, element after tel: hyperlink.
6. Add a copyright notice that uses the idiomatic text element for italicized text, and uses the copyright symbol, after the phone hyperlink. We want the text to be smaller than the mailto: and tel: links so we will use the element.
Copyright © 2021 Kevin Flynn
7. Change text for copyright notice to be your Firstname Lastname.
8. Your footer in your web page should look like the following example with different text.
9. Open index.html in Preview mode in Cloud9 and compare to the index.html: sample solution at the back of this document. Your file should be similar in appearance and content.
10. Add a title element, () to the head element (title HTML element goes here) in index.html. Edit the content of the heading level 1 elementto be Firstname Lastname: Homepage.
1.3 Academics, Professional, and Personal web pages
academics.html - Academics web page
1. Make a copy of index.html in your lab 2 folder. Rename the copied file to be academics.html. Edit the content of the heading level 1 element
...
to be Firstname Lastname: Academics.
Firstname Lastname: Academics
2. Edit the content of the title element in academics.html to be the same as the h1 element’s content in the previous step: Firstname Lastname: Academics.
3. Delete all four of the section elements in the main element in academics.html. Do not delete the header and footer elements.
4. Save and open academics.html in Preview mode in AWS. Your webpage should look like the example above with different images and text.
professional.html - Professional web page
1. Make a copy of academics.html in your lab 2 folder. Rename the copied file to be professional.html. Edit the content of the heading level 1 element
...
to be Firstname Lastname: Professional.
Firstname Lastname: Professional
2. Edit the content of the title element in professional.html to be the same as the h1 element’s content in the previous step: Firstname Lastname: Professional.
NOTE: since we made a copy of academics.html from index.html, then removed the main element’s content from academics.html except for the header and footer elements, we can make another copy from academics.html for use as personal.html, needing only to change the
and
academics.html: Academics web page
Next you will add UCR coursework to academics.html. We will use your current course schedule (Fall 2023) and your previous quarter’s classes (Spring 2023). If this is your first year at UCR, use Fall 2023 and your expected course schedule for next quarter, Winter 2024. Enrollment for Winter 2024 will not open for a few more weeks, so first year students should refer to UCR’s Class Schedule. You can select the Winter 2023 quarter to choose classes that were offered last year. Most of these classes will be offered again in Winter 2024.
1. Add a heading level 2 element
with content “Courses” after the opening main element tag.
2. Add a paragraph element
...
after the h2 element (opening taggoes directly after the closing tag). In the content of the paragraph, answer the following questions:
○ What is the coursework being completed for? A degree in what?
○ Are there classes that you chose to make yourself more well rounded or you have a genuine interest in learning in addition to your course of study?
○ When did you enroll to study at UCR and when do you expect to graduate?
○ Where are you on your journey at UCR? Does the work below represent your first year at UCR, or are you in your 2nd year or higher at the University?
3. Add two heading level 3 elements
, one each for Winter 2024 and Fall 2023. Place these after the complete paragraph element from the previous step (closing tag
○
Winter 2024
○
Fall 2023
NOTE: The sample solution for academics.html at the back of this document has course information for Winter 2021 (current) and Fall 2020. Your lab submission will list Winter 2024 (current) and Fall 2023. |
4. Add an unordered list element for each h3 element in the previous step. You can start with the unordered list HTML code stub below:
|
5. Each list item’s content needs to be replaced with course information: course number and course name. The course number should be made bold using the HTML Bring Attention To element (). The course name should be the default font for list items.
Example for unordered list of courses:
● CS006: Effective Use of the World Wide Web
● CS010C: Introduction to Data Structures and Algorithms
● MATH9C: First Year Calculus
● PHIL007: Introduction To Critical Thinking
Use the for cases like keywords in a summary, product names in a review, or other spans of text whose typical presentation would be boldfaced (but not including any special importance).
From: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/b.
6. Open academics.html in Preview mode in Cloud9 and compare to the academics.html: sample solution at the back of this document. NOTE: sample solution for academics.html at the back of this document has course information for Fall 2020 and Winter 2021.
professional.html: Résumé content
Next you will add a short resume to professional.html. This is a two-step process. First we will import a collection of HTML elements already in resume format. Then we will edit element content to contain your own information.
1. Open professional.html in edit mode in Cloud9 (source code view). Find the main element. The professional web page should have only a header, footer, and empty element inside:
...empty....
2. Copy and paste the entire block of code (found on the next page of this document) between the header and footer elements inside of the main element in professional.html. Then make the changes to this code described in the next steps.
○ before:
empty....
○ after:a
...paste code from here....
Education
Experience
Activities and Service
Honors
|
3. Change the content in the following list element to be the year you entered UCR.
4. Change the content in the following list element to be your major.
5. If you have a minor change the content in the following list element to be your minor. If you do not have a minor, delete this list item.
6. Change the content in the Experience section. There are three listed work experiences. Edit these to show your experience. Remove any extra list items that you do not need. You can add more listed items if you like.
7. Change the content in the Activities and Service section. There are four listed activities and services. Edit these to show your activities and service. Remove any extra list items that you do not need. You can add more listed items if you like.
8. Change the content in the Honors section. There are two listed honors. Edit these to show your honors. Remove any extra list items that you do not need. You can add more listed items if you like.
9. Open professional.html in Preview mode in Cloud9 and compare to the professional.html: sample solution at the back of this document.
personal.html: Goals and Bucket List
Next you will add your Bucket List and Goals lists from lab 1 to personal.html. You will also add a description (a paragraph each) for your rationale for each item in the lists.
1. Open personal.html in edit mode in Cloud9 (source code view). Find the main element. The personal web page should have only a header, footer, and empty element inside:
...empty...
2. Add a heading level 2 element
Bucket List
.
before:
empty....
after:a
...Bucket List
....
3. Add a paragraph element: after
Bucket List
. In the paragraph’s content describe why you want to have these experiences on your bucket list. If you already did this in lab 1 you can simply copy and paste the paragraph over from lab 1 (me.html) to lab 2.
4. Add your unordered Bucket List from lab 1 below .
5. Add a heading level 2 element
Goals
after your after unordered bucket list (-
...
6. Add a paragraph element: after
Goals
. In the paragraph’s content describe why you want to accomplish these things in your life. If you already did this in lab 1 you can simply copy and paste the paragraph over from lab 1 (me.html) to lab 2.
7. Add your ordered Goals list element (
-
...
8. Open personal.html in Preview mode in Cloud9 and compare to the personal.html: sample solution at the back of this document.
Turn-in
Students will upload a single .zip file that contains: index.html, professional.html, academics.html, professional.html and an image file in either .png, .jpg, or .jpeg format. Follow the instructions below.
1. If not already, configure AWS to download .zip file as default
● Instructions for this are at the end of this document in: Cloud9 - zip file set-up.
2. Download .zip file from AWS
● Select your lab 2 folder (in Cloud9) - for example: kflynn_lab2_section001. For Windows users right-click, for Mac press and hold down two fingers on the trackpad, until a drop down menu opens.
● Select Download from the menu. This will download a zipped archive file to your local machine. Warning: Do not download your entire home folder. Only your lab 2 folder
● If a student’s NetID was kflynn001, then the .zip file downloaded would be one of the following file names, depending on the lecture section.
■ kflynn001_lab2_section001.zip
■ kflynn001_lab2_section002.zip
■ kflynn001_lab2_section003.zip
3. Test HTML code from downloaded .zip file on local machine
● Locate the .zip file you downloaded from Cloud9 in the previous step.
This is typically in your local machine's Downloads, Desktop or Documents folder, unzip it (extract the lab 2 folder and its contents into a folder in the same folder the .zip file is currently in).
● Unzip the downloaded .zip file:
For Windows OS: https://www.howtogeek.com/668409/how-to-zip-and-unzip-files-on-windows-10
For Mac OS: https://www.howtogeek.com/672240/how-to-zip-and-unzip-files-and-folders-on-mac/
● Verify unzipped files are correct:
○ Open index.html in a Chrome web browser. See sample solution.
○ Open academics.html in a Chrome web browser. See sample solution.
○ Open professional.html in a Chrome web browser. See sample solution.
○ Open personal.html in a Chrome web browser. See sample solution.
○ Verify your image displays properly.
○ Verify all links in the navigation bar link to valid HTML files.
○ Verify your resume has the correct information displayed and is displayed correctly.
4. Submit .zip file to Canvas:
○ Correct code in previous step - If your code passed all tests in the previous step (Test HTML code from downloaded .zip file on local machine), upload the .zip file on your local machine to Canvas Lab 2 turn-in.
If there were errors and you still have time before the deadline, go back to Cloud9 and continue working on lab 2. Seek help in office hours if you get stuck. Then repeat this Lab 2 Turn-in process from step 2 (Download .zip file from AWS).