SlideShare a Scribd company logo
1 of 5
1
PART A
Underline the most suitable answer. (2 marks x10 = 20 marks)
1. HTML is what type of Language?
a. Scripting Language
b. Markup Language
c. Network Protocol
d. Programming Language
2. Inside which HTML element do we put the JavaScript?
a. <script>
b. <javascript>
c. <js>
d. <scripting>
3. What is NOT a heading tag in HTML?
a. <h5>
b. <h3>
c. <h4>
d. <h7>
4. What is NOT a method of writing CSS?
a. Inline
b. External
c. Embedded
d. Attached
5. What does the <br> tag add to your webpage?
a. Long break
b. Paragraph break
c. Line break
d. None of above
6. Which of the following statements is FALSE for PHP
a. PHP is client-side scripting language
b. PHP scripts are executed on the server
c. PHP files can contain text, HTML, CSS, JavaScript, and PHP
d. PHP is a widely-used, open source scripting language
7. What is correct way to write a CSS color values?
a. p {background-color: black};
b. p {bg-color: black};
c. p {background-color: black;}
d. p <background-color>:{ black };
2
8. _________ keyword is used to declare variables in JavaScript.
a. var
b. dim
c. String
d. None of the above
9. When a user views a page containing a JavaScript program, which machine executes the
script?
a. The user’s machine running a web browser.
b. The web server.
c. A central machine deep within Google’s corporate offices.
d. None of the above
10. What will be the output of the following PHP code
$num = 1;
$num1 = 2;
print $num . "+". $num1;
a. 3
b. 1+2
c. 1.+.2
d. Error
PART B
Question 1 (Total – 20 Marks)
1) Compare and contrast GET, POST requests. (You may use an example).
2) How to write comments in,
a) HTML
b) JavaScript
c) PHP
3) Write a JavaScript program to pops up prompt box.
4) Write a JavaScript program to display following.
Sample Output: I am a student of NSBM
3
Question 2 (Total – 20 Marks)
1) Write a PHP page to display “Hello Nsbm Green University!” in the page.
2) Explain the following diagram.
3) Write a PHP page to create the following page. And display the values in the same PHP page.
The table “Items” in the database “Food_Items” consists of the fields Item No, Description and Price.
Assuming that the database and the table have already been created using MySQL, write a PHP page
to insert the following record to the “Items” table.
Item No Description Price
D100 Flour 120.00
Use the SQL statement:
INSERT INTO Items(`itemno`,`description`,`price`) VALUES (‘D100,'Flour',120);
4
Question 3 (Total – 20 Marks)
1. What is the main role of CSS in Web Design (2 marks)
2. Briefly explain the difference between Classes and IDs used in CSS. (2 marks)
3. What is CSS box model? Define the use of its main elements (Margin, Border,
Padding, Content) (5 marks)
4. Create a simple HTML web page as follows (1 mark)
a. Write an external css file called style.css for the following requirements
(4 marks)
i. Change the color of section 2 to red.
ii. Change the color of section 1 to red and align the text to center
using id selector.
iii. Change the color of Section 5 and Section 6 to green and align
the text to center.
iv. Change the color of section 3 and section 4 to blue using group
selectors to minimize the code.
b. Set the background color to “linen” for the page, using an internal style
sheet. (1 mark)
c. Set the background color to “yellow” for the page, using an inline style.
Assuming all the above code is available what is the background color
of the page now? (3 marks)
d. Use the CSS Box model to complete below tasks, (2 marks)
i. Set the width of section 3 to 200px.
ii. Set the padding of the section 3 to "25px".
iii. Set the border of the section 3 to "25px solid black”
iv. Set the margin of the section 3 to "25px".
Section1 (Headersize = 1)
Section2 (Paragraph)
Section3 (div)
Section4 Headersize = 1
Section5 Headersize = 2
Section6 Headersize = 2
5
Question 4 (Total – 20 Marks)
1. “Java Script is not a case sensitive language” is this statement true or false?
Explain your answer. (3marks)
2. What is Document Object Model (DOM) in JavaScript? (3 marks)
3. Write a JavaScript program to calculate the area of a circle (radius=7)
(4 marks)
4. Write a small JavaScript program to take three inputs (num1, num2, num3).
Hint: Use prompt boxes to get inputs
(10 marks)
a. Add num1 and num2
b. Multiply the answer of above by num3
c. Use an alert box to display whether the final answer is an odd number
or an even number.
*** End of paper***

More Related Content

Similar to Paper

Web technology practical list
Web technology practical listWeb technology practical list
Web technology practical listdesaipratu10
 
Le Wagon - Build your Landing Page in 2 hours
Le Wagon - Build your Landing Page in 2 hoursLe Wagon - Build your Landing Page in 2 hours
Le Wagon - Build your Landing Page in 2 hoursSandrine Ayral
 
Le Wagon Tokyo | Build your Landing Page in 2 hours
Le Wagon Tokyo | Build your Landing Page in 2 hoursLe Wagon Tokyo | Build your Landing Page in 2 hours
Le Wagon Tokyo | Build your Landing Page in 2 hoursYannKlein2
 
1. Which of the following statements would correctly print out t.pdf
1. Which of the following statements would correctly print out t.pdf1. Which of the following statements would correctly print out t.pdf
1. Which of the following statements would correctly print out t.pdfezzi97
 
Web programming manual
Web programming manualWeb programming manual
Web programming manualShobha Kumar
 
Java Multiple Choice Questions and Answers
Java Multiple Choice Questions and AnswersJava Multiple Choice Questions and Answers
Java Multiple Choice Questions and AnswersJava Projects
 
Module 2 Lesson 2
Module 2 Lesson 2Module 2 Lesson 2
Module 2 Lesson 2claytors
 
Name _______________________________ Class time __________.docx
Name _______________________________    Class time __________.docxName _______________________________    Class time __________.docx
Name _______________________________ Class time __________.docxrosemarybdodson23141
 
Le wagon workshop - 2h landing page - Andre Ferrer
Le wagon   workshop - 2h landing page - Andre FerrerLe wagon   workshop - 2h landing page - Andre Ferrer
Le wagon workshop - 2h landing page - Andre FerrerAndré Ferrer
 
9 a0 045
9 a0 0459 a0 045
9 a0 045Almo56
 
A quick guide to Css and java script
A quick guide to Css and  java scriptA quick guide to Css and  java script
A quick guide to Css and java scriptAVINASH KUMAR
 
Cis363 week 3 i lab 3
Cis363 week 3 i lab 3Cis363 week 3 i lab 3
Cis363 week 3 i lab 3CIS363A
 
Cis363 a week 3 ilab 3
Cis363 a week 3 ilab 3Cis363 a week 3 ilab 3
Cis363 a week 3 ilab 3CIS363A
 
Cis363 week 3 i lab 3
Cis363 week 3 i lab 3Cis363 week 3 i lab 3
Cis363 week 3 i lab 3jkkjhdy798iyi
 
Class[3][5th jun] [three js]
Class[3][5th jun] [three js]Class[3][5th jun] [three js]
Class[3][5th jun] [three js]Saajid Akram
 

Similar to Paper (20)

Ui certification q&a
Ui certification q&aUi certification q&a
Ui certification q&a
 
Web technology practical list
Web technology practical listWeb technology practical list
Web technology practical list
 
Le Wagon - Build your Landing Page in 2 hours
Le Wagon - Build your Landing Page in 2 hoursLe Wagon - Build your Landing Page in 2 hours
Le Wagon - Build your Landing Page in 2 hours
 
Ans
AnsAns
Ans
 
Le Wagon Tokyo | Build your Landing Page in 2 hours
Le Wagon Tokyo | Build your Landing Page in 2 hoursLe Wagon Tokyo | Build your Landing Page in 2 hours
Le Wagon Tokyo | Build your Landing Page in 2 hours
 
1. Which of the following statements would correctly print out t.pdf
1. Which of the following statements would correctly print out t.pdf1. Which of the following statements would correctly print out t.pdf
1. Which of the following statements would correctly print out t.pdf
 
Web programming manual
Web programming manualWeb programming manual
Web programming manual
 
2h landing page
2h landing page 2h landing page
2h landing page
 
Java Multiple Choice Questions and Answers
Java Multiple Choice Questions and AnswersJava Multiple Choice Questions and Answers
Java Multiple Choice Questions and Answers
 
Module 2 Lesson 2
Module 2 Lesson 2Module 2 Lesson 2
Module 2 Lesson 2
 
Name _______________________________ Class time __________.docx
Name _______________________________    Class time __________.docxName _______________________________    Class time __________.docx
Name _______________________________ Class time __________.docx
 
Le wagon workshop - 2h landing page - Andre Ferrer
Le wagon   workshop - 2h landing page - Andre FerrerLe wagon   workshop - 2h landing page - Andre Ferrer
Le wagon workshop - 2h landing page - Andre Ferrer
 
9 a0 045
9 a0 0459 a0 045
9 a0 045
 
Le Wagon - 2h Landing
Le Wagon - 2h LandingLe Wagon - 2h Landing
Le Wagon - 2h Landing
 
A quick guide to Css and java script
A quick guide to Css and  java scriptA quick guide to Css and  java script
A quick guide to Css and java script
 
Cis363 week 3 i lab 3
Cis363 week 3 i lab 3Cis363 week 3 i lab 3
Cis363 week 3 i lab 3
 
Cis363 a week 3 ilab 3
Cis363 a week 3 ilab 3Cis363 a week 3 ilab 3
Cis363 a week 3 ilab 3
 
Cis363 week 3 i lab 3
Cis363 week 3 i lab 3Cis363 week 3 i lab 3
Cis363 week 3 i lab 3
 
Class[3][5th jun] [three js]
Class[3][5th jun] [three js]Class[3][5th jun] [three js]
Class[3][5th jun] [three js]
 
Le Wagon - Landing page
Le Wagon - Landing pageLe Wagon - Landing page
Le Wagon - Landing page
 

More from HarithaRanasinghe (20)

Session12 pointers
Session12 pointersSession12 pointers
Session12 pointers
 
Session11 single dimarrays
Session11 single dimarraysSession11 single dimarrays
Session11 single dimarrays
 
Session09 multi dimarrays
Session09 multi dimarraysSession09 multi dimarrays
Session09 multi dimarrays
 
Session07 recursion
Session07 recursionSession07 recursion
Session07 recursion
 
Session06 functions
Session06 functionsSession06 functions
Session06 functions
 
Session05 iteration structure
Session05 iteration structureSession05 iteration structure
Session05 iteration structure
 
Session04 selection structure_b
Session04 selection structure_bSession04 selection structure_b
Session04 selection structure_b
 
Session04 selection structure_a
Session04 selection structure_aSession04 selection structure_a
Session04 selection structure_a
 
Session03 operators
Session03 operatorsSession03 operators
Session03 operators
 
Session02 c intro
Session02 c introSession02 c intro
Session02 c intro
 
Session01 basics programming
Session01 basics programmingSession01 basics programming
Session01 basics programming
 
Program flow charts
Program flow chartsProgram flow charts
Program flow charts
 
Sad -sample_paper
Sad  -sample_paperSad  -sample_paper
Sad -sample_paper
 
Sad sample paper - mcq answers
Sad   sample paper - mcq answersSad   sample paper - mcq answers
Sad sample paper - mcq answers
 
Model questions
Model questionsModel questions
Model questions
 
Model paper algorithms and data structures
Model paper  algorithms and data structuresModel paper  algorithms and data structures
Model paper algorithms and data structures
 
Doc 20180208-wa0001
Doc 20180208-wa0001Doc 20180208-wa0001
Doc 20180208-wa0001
 
Doc 20180130-wa0006
Doc 20180130-wa0006Doc 20180130-wa0006
Doc 20180130-wa0006
 
Doc 20180130-wa0005
Doc 20180130-wa0005Doc 20180130-wa0005
Doc 20180130-wa0005
 
Doc 20180130-wa0004-1
Doc 20180130-wa0004-1Doc 20180130-wa0004-1
Doc 20180130-wa0004-1
 

Recently uploaded

[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...gurkirankumar98700
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhisoniya singh
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 

Recently uploaded (20)

[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 

Paper

  • 1. 1 PART A Underline the most suitable answer. (2 marks x10 = 20 marks) 1. HTML is what type of Language? a. Scripting Language b. Markup Language c. Network Protocol d. Programming Language 2. Inside which HTML element do we put the JavaScript? a. <script> b. <javascript> c. <js> d. <scripting> 3. What is NOT a heading tag in HTML? a. <h5> b. <h3> c. <h4> d. <h7> 4. What is NOT a method of writing CSS? a. Inline b. External c. Embedded d. Attached 5. What does the <br> tag add to your webpage? a. Long break b. Paragraph break c. Line break d. None of above 6. Which of the following statements is FALSE for PHP a. PHP is client-side scripting language b. PHP scripts are executed on the server c. PHP files can contain text, HTML, CSS, JavaScript, and PHP d. PHP is a widely-used, open source scripting language 7. What is correct way to write a CSS color values? a. p {background-color: black}; b. p {bg-color: black}; c. p {background-color: black;} d. p <background-color>:{ black };
  • 2. 2 8. _________ keyword is used to declare variables in JavaScript. a. var b. dim c. String d. None of the above 9. When a user views a page containing a JavaScript program, which machine executes the script? a. The user’s machine running a web browser. b. The web server. c. A central machine deep within Google’s corporate offices. d. None of the above 10. What will be the output of the following PHP code $num = 1; $num1 = 2; print $num . "+". $num1; a. 3 b. 1+2 c. 1.+.2 d. Error PART B Question 1 (Total – 20 Marks) 1) Compare and contrast GET, POST requests. (You may use an example). 2) How to write comments in, a) HTML b) JavaScript c) PHP 3) Write a JavaScript program to pops up prompt box. 4) Write a JavaScript program to display following. Sample Output: I am a student of NSBM
  • 3. 3 Question 2 (Total – 20 Marks) 1) Write a PHP page to display “Hello Nsbm Green University!” in the page. 2) Explain the following diagram. 3) Write a PHP page to create the following page. And display the values in the same PHP page. The table “Items” in the database “Food_Items” consists of the fields Item No, Description and Price. Assuming that the database and the table have already been created using MySQL, write a PHP page to insert the following record to the “Items” table. Item No Description Price D100 Flour 120.00 Use the SQL statement: INSERT INTO Items(`itemno`,`description`,`price`) VALUES (‘D100,'Flour',120);
  • 4. 4 Question 3 (Total – 20 Marks) 1. What is the main role of CSS in Web Design (2 marks) 2. Briefly explain the difference between Classes and IDs used in CSS. (2 marks) 3. What is CSS box model? Define the use of its main elements (Margin, Border, Padding, Content) (5 marks) 4. Create a simple HTML web page as follows (1 mark) a. Write an external css file called style.css for the following requirements (4 marks) i. Change the color of section 2 to red. ii. Change the color of section 1 to red and align the text to center using id selector. iii. Change the color of Section 5 and Section 6 to green and align the text to center. iv. Change the color of section 3 and section 4 to blue using group selectors to minimize the code. b. Set the background color to “linen” for the page, using an internal style sheet. (1 mark) c. Set the background color to “yellow” for the page, using an inline style. Assuming all the above code is available what is the background color of the page now? (3 marks) d. Use the CSS Box model to complete below tasks, (2 marks) i. Set the width of section 3 to 200px. ii. Set the padding of the section 3 to "25px". iii. Set the border of the section 3 to "25px solid black” iv. Set the margin of the section 3 to "25px". Section1 (Headersize = 1) Section2 (Paragraph) Section3 (div) Section4 Headersize = 1 Section5 Headersize = 2 Section6 Headersize = 2
  • 5. 5 Question 4 (Total – 20 Marks) 1. “Java Script is not a case sensitive language” is this statement true or false? Explain your answer. (3marks) 2. What is Document Object Model (DOM) in JavaScript? (3 marks) 3. Write a JavaScript program to calculate the area of a circle (radius=7) (4 marks) 4. Write a small JavaScript program to take three inputs (num1, num2, num3). Hint: Use prompt boxes to get inputs (10 marks) a. Add num1 and num2 b. Multiply the answer of above by num3 c. Use an alert box to display whether the final answer is an odd number or an even number. *** End of paper***