LA TROBE UNIVERSITY SEMESTER ONE EXAMINATION PERIOD CAMPUS AW BE BU MI SH ALLOWABLE MATERIALS

Similar documents
LA TROBE UNIVERSITY SEMESTER ONE EXAMINATION PERIOD. Subject Name: WEB DEVELOPMENT CAMPUS AW BE BU MI SH ALLOWABLE MATERIALS

HTML Summary. All of the following are containers. Structure. Italics Bold. Line Break. Horizontal Rule. Non-break (hard) space.

Deccansoft Software Services

HTML and CSS COURSE SYLLABUS

CHAPTER 2 MARKUP LANGUAGES: XHTML 1.0

Lab 4 CSS CISC1600, Spring 2012

CSI 3140 WWW Structures, Techniques and Standards

Part A Short Answer (50 marks)

Study Guide 2 - HTML and CSS - Chap. 6,8,10,11,12 Name - Alexia Bernardo

CSS: The Basics CISC 282 September 20, 2014

Chapter 1 Getting Started with HTML 5 1. Chapter 2 Introduction to New Elements in HTML 5 21

As we design and build out our HTML pages, there are some basics that we may follow for each page, site, and application.

CSI 3140 WWW Structures, Techniques and Standards. Markup Languages: XHTML 1.0

Text and Layout. Digital Multimedia, 2nd edition Nigel Chapman & Jenny Chapman Chapter 11. This presentation 2004, MacAvon Media Productions

Make a Website. A complex guide to building a website through continuing the fundamentals of HTML & CSS. Created by Michael Parekh 1

Lab Introduction to Cascading Style Sheets

Web Site Development with HTML/JavaScrip

Session 4. Style Sheets (CSS) Reading & References. A reference containing tables of CSS properties

Cascading Style Sheet. Styles as Tag Attributes. Syntax. <h1>: what font type/size is used? STYLE = SELECTOR {RULES} Attributes such as bgcolor

GIMP WEB 2.0 MENUS. Before we begin this tutorial let s visually compare a standard navigation bar and a web 2.0 navigation bar.

Structure Bars. Tag Bar

Assignments (4) Assessment as per Schedule (2)

Introduction to WEB PROGRAMMING

ADDING CSS TO YOUR HTML DOCUMENT. A FEW CSS VALUES (colour, size and the box model)

Shane Gellerman 10/17/11 LIS488 Assignment 3

CSS.

CSS Cascading Style Sheets

Ministry of Higher Education and Scientific Research

Final Exam Study Guide

XHTML & CSS CASCADING STYLE SHEETS

CMPT 165 Advanced XHTML & CSS Part 3

Web Publishing Basics I

LING 408/508: Computational Techniques for Linguists. Lecture 14

CIS 228 (Spring, 2012) Final, 5/17/12

In the early days of the Web, designers just had the original 91 HTML tags to work with.

Digital Asset Management 2. Introduction to Digital Media Format

Module Contact: Dr Graeme Richards, CMP. Copyright of the University of East Anglia Version 1

Cascading style sheets, HTML, DOM and Javascript

CSS. Lecture 16 COMPSCI 111/111G SS 2018

Implementing a chat button on TECHNICAL PAPER

HTML: Parsing Library

Web Design and Development Tutorial 03

ICT IGCSE Practical Revision Presentation Web Authoring

Student, Perfect Midterm Exam March 24, 2006 Exam ID: 3193 CS-081/Vickery Page 1 of 5

Wireframe :: tistory wireframe tistory.

Notes General. IS 651: Distributed Systems 1

CS 350 COMPUTER/HUMAN INTERACTION. Lecture 6

CSS Lecture 16 COMPSCI 111/111G SS 2018

Introduction to Web Design CSS Reference

Introduction to Web Design CSS Reference

Exam II CIS 228: The Internet Prof. St. John Lehman College City University of New York 5 November 2009

GRAPHIC WEB DESIGNER PROGRAM

introduction to XHTML

Web Programming and Design. MPT Senior Cycle Tutor: Tamara Week 2

Scripting for Multimedia LECTURE 5: INTRODUCING CSS3

CIS 228 (Fall 2011) Exam 2, 11/3/11

Week 1 - Overview of HTML and Introduction to JavaScript

Navigation. Websites need a formalized system of links to allow users to navigate the site

INTRODUCTION TO CSS. Mohammad Jawad Kadhim

Internet publishing HTML (XHTML) language. Petr Zámostný room: A-72a phone.:

Exam Format: Multiple Choice, True/False, Short Answer (3 points each 75 points total) Write-the-page (25 points)

Chapter 2 HTML and CSS

Understanding this structure is pretty straightforward, but nonetheless crucial to working with HTML, CSS, and JavaScript.

COPYRIGHTED MATERIAL. Contents. Chapter 1: Creating Structured Documents 1

Comm 244 Week 3. Navigation. Navigation. Websites need a formalized system of links to allow users to navigate the site

Fundamentals: Client/Server

Unit 10 - Client Side Customisation of Web Pages. Week 5 Lesson 1 CSS - Selectors

c122sep2214.notebook September 22, 2014

Document Object Model. Overview

Html basics Course Outline

Creating and Building Websites

CS 350 Internet Applications I Name: Exam II (CSS) October 29, 2013

CSS: Cascading Style Sheets

Web Development IB PRECISION EXAMS

COMP519 Web Programming Lecture 6: Cascading Style Sheets: Part 2 Handouts

Web Programming and Design. MPT Junior Cycle Tutor: Tamara Demonstrators: Aaron, Marion, Hugh

<body bgcolor=" " fgcolor=" " link=" " vlink=" " alink=" "> These body attributes have now been deprecated, and should not be used in XHTML.

Design Project. i385f Special Topics in Information Architecture Instructor: Don Turnbull. Elias Tzoc

Chapter 3 Style Sheets: CSS

PIC 40A. Midterm 1 Review

Vebra Search Integration Guide

ICT IGCSE Practical Revision Presentation Web Authoring

Overview. Part I: Portraying the Internet as a collection of online information systems HTML/XHTML & CSS

Cascading Style Sheet

Modify cmp.htm, contactme.htm and create scheduleme.htm

Controlling Appearance the Old Way

CSS: formatting webpages

Cascading Style Sheets Level 2

What is the Box Model?

BEFORE CLASS. If you haven t already installed the Firebug extension for Firefox, download it now from

A designers guide to creating & editing templates in EzPz

AIM. 10 September

Chapter 2:- Introduction to XHTML. Compiled By:- Sanjay Patel Assistant Professor, SVBIT.

Introduction to using HTML to design webpages

<style type="text/css"> <!-- body {font-family: Verdana, Arial, sans-serif} ***set font family for entire Web page***

Zen Garden. CSS Zen Garden

HTML TAG SUMMARY HTML REFERENCE 18 TAG/ATTRIBUTE DESCRIPTION PAGE REFERENCES TAG/ATTRIBUTE DESCRIPTION PAGE REFERENCES MOST TAGS

The [HTML] Element p. 61 The [HEAD] Element p. 62 The [TITLE] Element p. 63 The [BODY] Element p. 66 HTML Elements p. 66 Core Attributes p.

HTML Hyperlinks (Links)

COMS W3101: SCRIPTING LANGUAGES: JAVASCRIPT (FALL 2017)

Transcription:

LIBRARY USE LA TROBE UNIVERSITY SEMESTER ONE EXAMINATION PERIOD 2013 Student ID: Seat Number: Unit Code: CSE2WD Paper No: 1 Unit Name: Paper Name: Reading Time: Writing Time: Web Development Final 15 minutes 2 hours No. of Pages (including cover sheet): 9 pages OFFICE USE ONLY (FACULTY/SCHOOL STAFF): CAMPUS AW BE BU MI SH ALLOWABLE MATERIALS Number Description 18 Students from non English speaking backgrounds can bring unmarked, non electronic translation dictionaries into the examination. (non subject specific) 92 Students may make notes during reading time (not on script books or multiple choice answer sheets). INSTRUCTIONS TO CANDIDATES 1. This paper accounts for 60% of the total assessment for this unit. 2. This paper consists of five equally weighted questions. Total Marks for this paper= 100 3. Indicate on the front of the exam script book which questions you have attempted to answer. This paper MUST NOT BE REMOVED from the examination venue

Question 1. (a) For each of the following DOCTYPE declarations, identify the version of HTML being used: (i) <!DOCTYPE html> (ii) <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/tr/xhtml1/dtd/xhtml1-strict.dtd"> (iii)<!doctype html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/tr/html4/loose.dtd"> (b) Which organisation is primarily responsible for HTML, CSS and DOM standards? (c) Which organisation is responsible for Javascript standards? (d) Briefly identify what is meant by (i) a "well formed" and (ii) a "valid" HTML document? (e) What is the primary role for each of the following technologies with respect to HTML documents? (i) HTML, (ii) Cascading Style Sheets, (iii) the Document Object Model (DOM), and (iv) Javascript, (f) What is quirks mode and when will a browser use it? (g) How does a Web browser determine which mode to use for rendering a web page. (h) Which of the following elements must be present to make the code valid in html5? <title>cse2wd Exam</title> <link rel="stylesheet" type="text/css" href="mycssrules.css" /> <meta http-equiv="content-type" content="text/html; charset=utf-8"/> <script type="text/javascript" src="myjavascript.js"></script> (i) Why can't the following html document be served by the Apache web server from your public_html folder with the following permissions? -rw-----w- 1 jabloggs student 270 Apr 19 12:46 index.html ( a b c d e f g h i ). ( 3 + 1 + 1 + 4 + 4 + 2 + 2 + 2 +1 = 20 marks) (Page 2 of 9)

Question 2. (a) Carefully examine the following code: 01 <!DOCTYPE html> 02 <html> 03 <head> 04 <link rel="stylesheet" type="text/css" href="weather.css" /> 05 <meta http-equiv="content-type" content="text/html; charset=utf-8" /> 06 </head> 07 <body> 08 <h4>bendigo<h4/> 09 <table id="#2dayforecast> 10 <tbody> 11 <tr><th>day</th><th>today</th><th>tomorrow<th /></tr> 12 <hr /> 13 <tr class='redtext'><th>max Temp <sup>o<b>c</sup></b></th> 14 <td>13</td><td>18</td> 15 </tr><br /> 16 <tr class='images'> 17 <th></th><td><img href=clouds.png /></td><td></td> 18 </tr> 19 </tbody> 20 </table> 21 </body> 22 </html> Identify at least eight (8) syntax errors in the body of the html document by (i) supply the line number of the line containing the error, (ii) a brief description of the error, (iii) and where possible rewrite the line with the error corrected. Question 2 continues next page... (Page 3 of 9)

(b) The html code for the table element in figure 2b-1 is not valid according to the DTD fragment given in figure 2b-2. Identify the errors in the html and explain why it is invalid in terms of the rules given in the DTD. figure 2b-1 <body> <table> <thead> <caption>exam 2013</caption> </thead> <tbody> <tr><td>hello</td><p>world!</p></tr> <tr></tr> </tbody> </table> </body> figure 2b-2 The following DTD fragment is based upon the XHTML version 1.0 DTD for the table element <!ELEMENT table(caption?, (col* colgroup*), thead?, tfoot?, (tbody+ tr+))> <!ELEMENT caption %inline;> <!ELEMENT thead (tr)+> <!ELEMENT tfoot (tr)+> <!ELEMENT tbody (tr)+> <!ELEMENT colgroup (col)*> <!ELEMENT col EMPTY> <!ELEMENT tr (th td)+> <!ELEMENT th %flow;> <!ELEMENT td %flow;> <!-- %flow; mixes block and inline --> <!ENTITY % flow "(#PCDATA %block; %inline; )*"> where #PCDATA refers to character data, %block is any block element, and %inline is any inline element. (14 + 6 = 20 marks) (Page 4 of 9)

Question 3. /* use this CSS file named: "mystyles.css" when answering parts (a), (b) and (c) */ p { color: green; font-size: 12px} h1 { font-size: 32px; text-align: left ; color: purple} h2 { font-size: 24px; text-align: center ; color: lime} #content { font-family: sans-serif; color: #000; font-size: 16px }.plain { font-family: monospace; font-style: normal; color: black} div.plain h2, h1 { font-size: 16px; color: blue } (a) In what order are the rules defined by the tag selector, id selector and class selector applied to an element that uses all three of these CSS selectors? eg. <p id="content" class="plain"> (b) In what colour will each of the heading element contents be displayed in the following code: (i) <div><h2>hello World!</h2></div> (ii) <div id="content"><h2>hello World!</h2></div> (iii)<div class="plain"><h2>hello World!</h2></div> (iv) <div><h1>hello World!</h1></div> (v) <div id="content"><h1>hello World!</h1></div> (c) Describe how the text in the paragraph element will appear when rendered and list the final value for each style property that is applied to the p element when it is rendered. <html> <head> <link rel="stylesheet" type="text/css" href="mystyles.css" media="screen" /> <style type="text/css">.box { background-color:yellow; border:thin dashed black; margin:1em; } #content { color: red; background-color:silver;} p { color:yellow; font-size: 16px; background-color:black; } </style> </head> <body> <p id="content" class="box" style="color:olive;"> Style sheets are for presentation </p> </body> </html> Question 3 continues next page... (Page 5 of 9)

(d) The box model is used by Cascading Style Sheets to define the regions occupied by some XHTML elements such as the div element. The box model uses padding, border and margin CSS properties. Use a clearly labelled diagram to explain what each of the padding, border and margin properties define with respect to the content being displayed for the element. (e) Briefly outline the cascading order in which style rules are assigned when conflicting style rules from different style sheets are applied to an element in an HTML document. Consider a mixture of inline, embedded and multiple external style sheets being applied in your answer. (2+5+6+4+3= 20 marks) (Page 6 of 9)

Question 4. (a) Give two (2) advantages of using an external file for storing Javascript functions. Include an example of the opening HTML script tag that would be used to reference an external Javascript (.js) file. (b) What is the type and value of the variables b and d after the following Javascript code is executed? <script type="text/javascript"> var a = 2; var b = 1; var c = 2; var d = 2; var fruitarray = new Array(); fruitarray[0] = "lemon"; fruitarray[1] = "banana"; fruitarray[2] = "apple"; fruitarray[3] = "orange"; fruitarray[4] = "straberry"; fruitarray[5] = "plum"; if( b <= a ){ d = c*(a b) + 1; b = fruitarray[d]; }else{ d = a; b = fruitarray[c]; } alert( "b now contains: " + b + " and d contains: " + d); </script> (c) Write javascript code to including a for loop, an array and document.write() statements to generate a simple table including column headings that displays each of the whole day numbers from 1 to 7 in the first column and the corresponding day of the week in the second column as shown below: Number DayName 1 Sunday 2 Monday...... 7 Saturday ( ie. 1=Sunday, 2=Monday, 3=Tuesday, 4=Wednesday, 5=Thursday, 6=Friday, 7=Saturday) ( (2+2) + 4 + 12 = 20 marks) (Page 7 of 9)

Question 5. (a) Examine the following JavaScript and draw a picture to show the output as it would be rendered by a Web browser. You can assume that no style sheets are applied to this page. <body> <div id="mydiv"></div> <script type="text/javascript"> //<![CDATA[ var namelist = new Array("George", "Anne","David", "Sue"); var mylistitemelement; var textnode; var fruit; var mylist = document.createelement('ol'); for ( var i=0; i<namelist.length; i++){ li = document.createelement('li'); fruit = namelist[i]; text = document.createtextnode(fruit); } li.appendchild(text); mylist.appendchild(li); var mydivelement = document.getelementbyid("mydiv"); mydivelement.appendchild(mylist); //]]> </script> </body> Question 6 continues next page -- (Page 8 of 9)

(b) Supply the equivalent HTML code fragment that would produce the DOM tree structure for an unordered list with an id of "rootnode" as shown in figure 5. (c) Write the necessary Javascript code to append a heading 1 (h1) with a child text Node containing the word "deck" to the second list item. figure 5. ul id="rootnode" li li li p window rudder p anchor wheel Represents a text Node Represents an element Node ( 4 + 4 + 12 = 20 marks) (Page 9 of 9)