Design Project 2
Design Project 2
(a) Using the <link> tag with the href attribute - Links stylesheets, not for hyperlinks
(c) By directly embedding the URL in the text - Not recommended for maintainability
(a) <img src="image.jpg"> - While it works, the alt attribute is important for accessibility
(c) <picture src="image.jpg"></picture> - Used for responsive images with different sizes
(d) By uploading the image directly to the server - This doesn't embed the image in the HTML
4- How can you target all <p> elements on a webpage with the same style rule in CSS?
(a) <p style="color: red"> (inline styles) (b) .paragraph { color: red; }
(c) #main-content p { color: red; } (descendant selector) (d) None of the above
5- What is the correct way to declare a variable in JavaScript that can be re-assigned later?
(a) const name = "John" (used for constants) (b) let name = "John"
(c) var name = "John" (has scoping issues, less preferred) (d) All of the above can be used
6- What data type will the following code evaluate to: typeof(10 + "5")?
Page 1 of 3
(b) while ($i < 5) { ... } $i++
(a) To store session data (b) To access data passed through a URL query string
1. Explain the concept of SQL Injection vulnerabilities and how prepared statements in PHP can help
mitigate this risk. Provide a basic code example (using prepared statements) to demonstrate this
concept. (3 Marks)
2. Discuss the role of secure password hashing techniques in web applications. Briefly compare two
common hashing algorithms used with PHP and their security advantages. (3 Marks)
3. Describe the role of Cascading Style Sheets (CSS) and Javascript in web development. How can
these technologies potentially introduce security vulnerabilities? (2 Marks)
4. Discuss two best practices for securely storing user data in a web application. (2 Marks)
1. Write the corresponding HTML code of this page knowing that the title of the page is HTML-CSS-
JAVASCRIPT 3 marks
2. Write a CSS code to specify the background color of the body to red, the font-family to Time new
roman and font-size to 14 2 marks
Page 2 of 3
3. Write a javascript that you will insert in the previous web page to perform the conversion from FCFA
to EURO when clicking on the button “=”. (Note that 1 EURO=656 FCFA) (5 marks)
B. You are tasked with designing a secure web application for a local library. The application will allow
users to search for books, manage their library accounts, and renew book loans online.
Instructions:
1. Identify three key security considerations you would prioritize during the design phase of the library
web application. Explain your reasoning. (3 Marks)
2. What web development tools would you recommend for this project and why? (3 Marks)
3. Design a simple login form for the library web application. Include essential security features such as
input validation and secure password storage. (4 Marks)
« Striving for success without hard work is like trying to harvest when you haven't planted." »
David Bly
GOOD LUCK
Page 3 of 3