KENYA NATIONAL EXAMINATIONS COUNCIL
DIPLOMA IN INFORMATION COMMUNICATION TECHNOLOGY
MODULE III
INTERNET BASED PROGRAMMING
November 2022
Time: 3 hours
INSTRUCTIONS TO CANDIDATES
This paper consists of EIGHT questions.
Answer ANY FIVE of the eight questions in the answer booklet provided.
Candidates should answer the questions in English.
This paper consists of 5 printed pages.
Candidates should check the question paper to ascertain that all the pages are printed as indicated and that no questions are missing.
©2022 The Kenya National Examinations Council
Turn over
1.
(a) State four types of multimedia elements that may be displayed on a web page.
Audio
Video
Images
Animations
(b) With the aid of an example in each case, explain two ways in which scripts (programming languages) can be used on a web page.
Client-side scripting: This involves running scripts directly on the user’s browser. Example: JavaScript for form validation.
Server-side scripting: This involves scripts running on a server and generating dynamic content. Example: PHP to fetch data from a database and display it on a web page.
(c) Distinguish between each of the following pairs of tags as used in HyperText Markup Language (HTML):
(i)
and
is used to define the largest heading, while
is used to define a paragraph.
(ii)
(d) A web developer was required to design a sitemap before developing a website for a client. Explain three reasons for this approach.
Improved navigation: Helps in planning the structure of the website for easier user navigation.
Better SEO (Search Engine Optimization): Assists search engines in crawling and indexing all the pages of the website.
Client approval: Helps in visualizing the website layout and gaining client approval before development starts.
2.
(a) Outline four benefits of creating user pull rather than user push when developing a website.
Increased user engagement: Users actively seek content, leading to better interaction.
Reduced intrusiveness: Users are not overwhelmed by unsolicited information.
Better content targeting: Content is more likely to meet user needs as they request it.
Enhanced personalization: Users can receive tailored content based on their requests.
(b) Write a HTML statement that would implement each of the following instructions on a web page:
(i) An internal horizontal frame whose width is 70% of the page width and has thickness of 5 units.
html
Copy code
(ii) The text “my best school” displayed as a paragraph and the word “school” is subscripted.
my best school
3.
(a) A school wishes to select a company that can host their website. Explain three factors the school should consider when selecting the company.
Reliability: Ensure that the hosting company has high uptime guarantees to avoid website downtime.
Security features: Check for features like SSL certificates, backups, and malware protection.
Customer support: Ensure that the hosting company provides 24/7 technical support in case of issues.
(b) Explain two causes of errors that may affect the following operations in secure information transmission:
(i) Using the protocol HyperText Transfer Protocol Secure (HTTPS).
Expired SSL certificate: The website’s security certificate may have expired, causing errors in secure data transmission.
Incompatible browser versions: Older browsers may not support the latest version of HTTPS, causing connection issues.
(ii) Carry out daily banking on the site.
Server overload: The banking server could be overloaded, leading to timeout errors.
Hacker attacks: Cyberattacks, such as Distributed Denial of Service (DDoS), can interrupt banking operations.
4.
(a) Distinguish between a selector and a selector list as used in Uniform Resource Locator (URL).
Selector: Specifies a single element or item on a page that the URL points to.
Selector list: Refers to a group of elements or items identified by the URL.
(b) Explain three attributes that may be used to mark an ordered list tag in HTML.
Type: Defines the numbering type (e.g., 1, a, A, i).
Start: Specifies the starting value of the list.
Reversed: Reverses the order of the list items.
5.
(a) Write a HTML code that would display the following form when run on a browser.
html
Copy code
6.
(a) Table 1 shows a criterion used to allocate houses to citizens by a standard based on monthly rent.
Table 1
House type Monthly Rent
No Government House Less than 1000
Type B House Greater than 1000 but less than 1500
Type A House Greater than 1500 but less than 2000
Type C House Any other
(b) Write a JavaScript program embedded in HTML that would prompt a user to enter the monthly rent. The program should determine and display the type of house.
function houseType() {
var rent = prompt(“Enter your monthly rent:”);
if (rent < 1000) {
alert("No Government House");
} else if (rent < 1500) {
alert("Type B House");
} else if (rent < 2000) {
alert("Type A House");
} else {
alert("Type C House");
}
}
(c) Explain two attributes of a form as used in HTML.
Action: Specifies where to send the form data when the form is submitted.
Method: Defines how form data should be sent (either GET or POST).
(d) Write a HTML statement that would perform each of the following when run on a web browser:
(i) Link to an email address abc@abc.com when the text Send Comments is clicked.
Send Comments
(e) The link to an image whose source is myimage.jpg located in the img directory.

7.
(a) Outline four characteristics of a GIF as compared to a JPEG format.
Supports animation: GIF can support animated images, while JPEG cannot.
Transparency: GIF supports transparency, while JPEG does not.
File size: GIF files are typically smaller in size compared to JPEG files for simpler images.
Color depth: GIF supports up to 256 colors, while JPEG supports millions of colors.
8.
(a) Outline two examples of mouse events as used in JavaScript programs.
onclick: Triggered when the user clicks on an element.
onmouseover: Triggered when the mouse pointer is moved over an element.
(b) Identify the type of web testing applied in each of the following cases giving a reason for your answer:
(i) Checking for display errors.
Compatibility testing: Ensures the website displays correctly across different browsers and devices.
(ii) Checking whether documents and files are accessible when given a specific uniform resource locator.
Accessibility testing: Ensures that the website’s content is accessible to all users, including those with disabilities.
