CSI 3140 WWW Structures, Techniques and Standards

Similar documents
Part A Short Answer (50 marks)

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

HTML. HTML Evolution

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

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

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

Document Object Model. Overview

Vebra Search Integration Guide

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

HyperText Markup Language (HTML)

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

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

WML2.0 TUTORIAL. The XHTML Basic defined by the W3C is a proper subset of XHTML, which is a reformulation of HTML in XML.

PIC 40A. Midterm 1 Review

Lab 4 CSS CISC1600, Spring 2012

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

Title: Dec 11 3:40 PM (1 of 11)

HTML. HTML is now very well standardized, but sites are still not getting it right. HTML tags adaptation

Wireframe :: tistory wireframe tistory.

UNIT I. A protocol is a precise set of rules defining how components communicate, the format of addresses, how data is split into packets

HTML HTML. Chris Seddon CRS Enterprises Ltd 1

XHTML & CSS CASCADING STYLE SHEETS

New Media Production HTML5

CSI 3140 WWW Structures, Techniques and Standards. Representing Web Data: XML

Notes General. IS 651: Distributed Systems 1

Project 3 CIS 408 Internet Computing

HTML & CSS. Rupayan Neogy

CHAPTER 2 MARKUP LANGUAGES: XHTML 1.0

Extensible Markup Language (XML) Hamid Zarrabi-Zadeh Web Programming Fall 2013

Tutorial 1 Getting Started with HTML5. HTML, CSS, and Dynamic HTML 5 TH EDITION

introduction to XHTML

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

AIM. 10 September

Creating A Web Page. Computer Concepts I and II. Sue Norris

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

Designing and Developing a Website. December Sample Exam Marking Scheme

Introduction to HTML5

Lab Introduction to Cascading Style Sheets

Implementing a chat button on TECHNICAL PAPER

Birkbeck (University of London)

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.

Advanced HTML Scripting WebGUI Users Conference

CREATING A WEBSITE USING CSS. Mrs. Procopio CTEC6 MYP1

Html basics Course Outline

Structured documents

Introduction to WEB PROGRAMMING

SEEM4570 System Design and Implementation. Lecture 1 Cordova + HTML + CSS

Week 1 - Overview of HTML and Introduction to JavaScript

ATL Transformation Example

Lecture : 3. Practical : 2. Course Credit. Tutorial : 0. Total : 5. Course Learning Outcomes

Schenker AB. Interface documentation Map integration

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

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

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

CS134 Web Site Design & Development. Quiz1

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

Three Ways to Use CSS:

CSC309 Midterm Exam Summer 2007

Create web pages in HTML with a text editor, following the rules of XHTML syntax and using appropriate HTML tags Create a web page that includes

Outline. XML vs. HTML and Well Formed vs. Valid. XML Overview. CSC309 Tutorial --XML 4. Edward Xia

How the Internet Works

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

Outline. XML DOCTYPE External - SYSTEM. XML DOCTYPE Internal DTD &6&7XWRULDO ;0/ (GZDUG;LD

Fall Semester 2016 (2016-1)

XML: Introduction. !important Declaration... 9:11 #FIXED... 7:5 #IMPLIED... 7:5 #REQUIRED... Directive... 9:11

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

Alpha College of Engineering and Technology. Question Bank

Chapter 3 Style Sheets: CSS

Data Presentation and Markup Languages

1/6/ :28 AM Approved New Course (First Version) CS 50A Course Outline as of Fall 2014

Displaying XML Documents

Comp 426 Midterm Fall 2013

Delivery Options: Attend face-to-face in the classroom or remote-live attendance.


DESIGNING AND DEVELOPING A WEBSITE MARKING SCHEME

Web Development & Design Foundations with XHTML. Chapter 2 Key Concepts

Tips from Bryan. (past student)

Web Publishing Basics I

Review of HTML. Chapter Pearson. Fundamentals of Web Development. Randy Connolly and Ricardo Hoar

INSTITUTE OF AERONAUTICAL ENGINEERING (Autonomous) Dundigal, Hyderabad

Which is why we ll now be learning how to write in CSS (or cascading sheet style)

INTRODUCTION TO CSS. Mohammad Jawad Kadhim

HTML: Parsing Library

Web Development and HTML. Shan-Hung Wu CS, NTHU

UNIT -II. Language-History and Versions Introduction JavaScript in Perspective-

HTML & CSS. Lesson 1: HTML Basics Lesson 2: Adding Tables Lesson 3: Intro to CSS Lesson 4: CSS in more detail Lesson 5: Review

Introduction to Web Technologies

Diploma in Mobile App Development Part I

Announcements. Paper due this Wednesday

Ministry of Higher Education and Scientific Research

Using Dreamweaver CC. 6 Styles in Websites. Exercise 1 Linked Styles vs Embedded Styles

Author: Irena Holubová Lecturer: Martin Svoboda

TUTORIAL QUESTION BANK

Micronet International College

IT350 Web & Internet Programming. Fall 2012

Using Dreamweaver CS6

First Name Last Name CS-081 March 23, 2010 Midterm Exam

Perfect Student Midterm Exam March 20, 2007 Student ID: 9999 Exam: 7434 CS-081/Vickery Page 1 of 5

HTML & XHTML Tag Quick Reference

Structure Bars. Tag Bar

Transcription:

CSI 3140 WWW Structures, Techniques and Standards Midterm examination Length of Examination: 75 minutes February 23, 2010 Professor: Guy-Vincent Jourdan Page 1 of 12 Family Name: Other Names: Student Number: Signature Closed book. Answer ALL questions. No calculators or other electronic devices are allowed. At the end of the exam, when time is up: - Stop working and turn your exam upside down. - Remain silent. - Do not move or speak until all exams have been picked up and the professor gives the go-ahead to leave. Marks Question 1 Question 2 Question 3 Question 4 Question 5 / 10 Marks / 10 Marks / 10 Marks / 10 Marks / 10 Marks TOTAL / 50 1

Question 1[10 Marks]: HTML 1. What is the purpose of the span tag? What is the difference between a span tag and a div tag? 2. What happens when a browser encounters a tag it doesn t understand? Provide an example where this behaviour has been used. 3. What happens when you include several spaces in a row in your html document? How do you get around this? 2

4. What will be rendered in a browser when reading the following html page: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/tr/xhtml1/dtd/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title> test table </title> </head> <body> <table border="1"> <caption> Be aware! </caption> <tr> <td>type</td><td> </td><th colspan="2">values</th> </tr> <tr> <th rowspan="2">normal</th><td>a</td><td>b</td><td>c</td> </tr> <tr> <td>a</td><td>b</td><td>c</td> </tr> <tr> <th>others</th><td>a</td><td> </td><td>b</td> </tr> </table> </body> </html> 3

Question 2 [10 Marks]: DTD 1. Consider the following XML DTD grammar (partial): <!ENTITY % lists "ul ol dl"> <!ENTITY % block "p div %lists; fieldset table"> <!ELEMENT map ((%block; form)+ area+)> <!ATTLIST map id ID #REQUIRED class CDATA #IMPLIED name NMTOKEN #IMPLIED > Give a factual description of what it tells you about the map element (just a few sentences) 4

2. Consider the following XML DTD grammar (partial): <!ELEMENT myarray (caption?, (line+), proper?)> <!ELEMENT caption (#PCDATA)> <!ELEMENT line (#PCDATA)> <!ELEMENT proper EMPTY> <!ATTLIST proper num ID #REQUIRED> Are the following documents correct? If not, identify and correct the error(s): <myarray> <line>some text</line> <line>some more text</line> <line>and some more</line> </myarray> <myarray> <line>some text</line> <line>some more text</line> <caption>those were two great lines</caption> </myarray> <myarray> <caption>i am just a </caption> </myarray> caption <myarray> <caption>the caption</caption> <line>some text</line> <line>some more text</line> <proper id="1" /> </myarray> 5

Question 3 [10 Marks]: CSS Consider the following HTML document: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/tr/xhtml1/dtd/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title> My Page </title> <link rel="stylesheet" type="text/css" href="style1.css" title="style 1" /> <link rel="alternate stylesheet" type="text/css" href="style2.css" title="style 2" /> <link rel="alternate stylesheet" type="text/css" href="style3.css" title="style 3" /> <link rel="alternate stylesheet" type="text/css" href="style4.css" title="style 4" /> </head> <body> <p id="first"> This is the first paragraph. </p> <p class="first"> This is the second paragraph. </p> </body> </html> The file style1.css reads as follows: #first {display:none The file style2.css reads as follows: #first {visibility:hidden The file style3.css reads as follows:.first {position:absolute; top:0.5em The file style4.css reads as follows: p {display:inline 6

1. What will be displayed in the browser when Style 1 is selected? 2. What will be displayed in the browser when Style 2 is selected? 3. What will be displayed in the browser when Style 3 is selected? 4. What will be displayed in the browser when Style 4 is selected? 7

5. Give a brief outline of the cascade of rules that are applied to decide which CSS rules to apply to an element 8

Question 4 [10 Marks]: JavaScript 1. What will be written in the alert window by the following JavaScript code? var o; o = new Data( "alpha" ); function Data( value ) { this.data = value; function getconstant() { return this.constant; function makedata( value ) { o = new Object(); o.constant = "bravo"; o.data = getconstant; return o; function test( param1, param2, param3 ) { param1 = makedata( "charlie" ); param2.data = "delta"; param3.data = "echo"; param2 = param3; return param1; var o1; o1 = new Data( "foxtrot" ); var o2 = o1; o2.data += "golf"; ANSWER o.data = o1.data = o2.data = var o3; o3 = new Data( "hotel" ); var o4; o4 = makedata( "indiana" ); var o5; o5 = test( o2, o3, o4 ); o3.data = o4.data = o5.data = window.alert( "o.data = " + o.data() + "\n o1.data = " + o1.data + "\n o2.data = " + o2.data + "\n o3.data = " + o3.data + "\n o4.data = " + o4.data + "\n o5.data = " + o5.data() ); 9

2. Write the code for the missing pop function function Stack() { this.top = null; this.isempty = function() { return this.top === null; this.push = function( info ) { this.top = { info:info, next:this.top this.pop= function() { //ADD YOUR CODE HERE var s = new Stack(); s.push( "examination" ); s.push( "mid-term" ); while (! s.isempty() ) { window.alert ( s.pop() ); try { s.pop(); catch ( e ) { window.alert ( "exception caught: " + e ); // > js stack.js // // mid-term // examination // exception caught: IllegalState: Stack is empty 10

Question 5 [10 Marks]: Servlet Give a brief explanation of the mechanism of URL rewriting implemented in Java Servlets with the encodeurl method of the HttpServletResponse class. Specifically, consider the following code snipplet: url = "GetCount"; url = response.encodeurl( url ); 1. After execution, what will be the format of the String url? 2. What is the goal of this mechanism? 3. When should it be used? 11

4. What are the difficulties associated with its usage? 5. Give an alternative to this mechanism. Briefly explain how this alternative works 12