Assignment2 PDF
Assignment2 PDF
Question 1
a) While it might be more difficult to design a website with a database back-end, it might
be a lot easier to maintain a database-driven website. Why? Explain at least two reasons
why database-driven websites are easier to maintain. [2]
b) Describe three of the four main advantages of standardization in the web design world.
[4]
c) Write the CSS code to add a pink background color to a class selector called “prince”
[1]
d) There are four ways to associate with an HTML document. List and explain how you
can use them. [10]
e) How do you write “Hello Zimbabweans” in PHP? [2]
Question 2
Question 4
a) Write a PHP program to display count, from 1 to 10 using a PHP loop. Hint One can use a
for loop or while loop [10]
b) Write a program in PHP to create the pattern below:
*
***
****
*****
******
*******
******** [10]
Hint: use a for nested loop
Question 5