Lab 05 Instruction-1
Lab 05 Instruction-1
1.2 Download the file surveyhome.html from Canvas and use it as a template for this lab work.
Step 2: Webpage Design
2.1 Using the home page designed Figure 1, identify the HTML elements required to structure
surveyhome.html. Determine if an “id” or “class” attribute is needed for the HTML elements.
3.1 Add the HTML general structure below to the document to construct the webpage.
<!DOCTYPE html>
<html lang="en">
<head>
<title>Survey Service</title>
<meta charset="utf-8" />
<meta name="description" content="Web Development" >
<meta name="keywords" content="HTML and CSS" >
<meta name="author" content="put your name here" >
</head>
<body>
…
</body>
</html>
3.2 Structure the webpage according to the mock up presented in Figure 1 using HTML5 structural elements,
e.g., <header>, <nav>, <main>, <article>, <section>, <aside>, <footer> and other
appropriate HTML structural elements.
3.3 Mark up the document within each HTML structural element using appropriate HTML content elements,
e.g., <h#>, <p>, <ul>, <a>, <img> and other appropriate elements. Specify “id” or “class” attribute
as needed.
Page 1
COS10005- Web Development Lab 05
Step 4: Folder and CSS File Creation
4.1 Create a new CSS file named surveyhome.css.
4.2 Create a folder named css and save surveyhome.css in that folder.
Note: A website might have more than one CSS file, so it is a good practice to store all CSS files in a
separate folder. See Figure 2 for example.
surveyhome.htm
Subfolders
surveyweb
survey01.htm
survey02.htm
survey03.htm
survey04.htm
survey05.htm
images
logo.gif
css
surveyhome.css
Figure 2: Directory structure
4.3 Add the following code into the head section (below the title element) of surveyhome.html. This will link
surveyhome.css to surveyhome.html.
Note: You might need to specify the id or the class attributes of applicable HTML elements so that they
can be properly selected in the CSS file for CSS application.
6. Ads sidebar
7. Ad 1
8. Ad 2
Page 2
COS10005- Web Development Lab 05
5.1 For the <main> element:
Float to the left;
Set width to be 65%;
Note: You might need to specify the id or the class attributes of applicable HTML elements so that
they can be properly selected in the CSS file for CSS application.
Page 3
COS10005- Web Development Lab 05
Note: You might need to specify the id or the class attributes of applicable HTML elements so that they
can be properly selected in the CSS file for CSS application.
7.1 Complete and apply the following CSS rule to the list element in the <nav> part of surveyhome.html
using an appropriate selector:
Float the list element to the left;
Remove all bullet point symbols;
Eliminate padding and margin; and
Make the list occupy the entire width.
7.2 Complete and apply the following CSS rule to all the <a> elements in the <nav> part of
surveyhome.html using an appropriate selector:
Float those <a> elements to the left;
Set width to be 6 times the current font size;
Remove the underline;
Set font color to be white;
Set background color to be blue;
Set the top and bottom padding to be 0.2em;
Set the right and left padding to be 0.6 em;
Set the border to be 1px, solid and white;
7.3 Complete and apply the following CSS rule to all the <a> elements in the <nav> part of survyhome.html
using an appropriate pseudo class selector:
Set the background color of the <a> elements to be brown on mouse over
7.4 Complete and apply the following CSS rule to all the <article> elements on survyhome.html using an
appropriate selector:
Set appropriate width and height; and
Set the text box shadow to be 3px 3px 3px 2px #797979;
Page 4
COS10005- Web Development Lab 05
}
7.5 Complete and apply the following CSS rule to all the <h#> elements in all the <article> elements on
survyhome.html using an appropriate an appropriate selector:
Set the text shadow to be #aaa 2px 2px 2px;
~/cos10005/www/htdocs/index.html http://mercury.swin.edu.au/cos10005/s1234567/index.html
~/cos60002/www/htdocs/lab05/surveyhome.html http://mercury.swin.edu.au/cos60002/s1234567/lab05/surveyhome.html
Note: You can copy the URLs in the table, but remember to replace the unit codes and student id in the
above examples with yours to obtain the URLs of your webpages on Mercury.
[IMPORTANT] When the browser authorization request dialog pops up, use your SIMS username and
password to confirm access.
Page 5