MCQs — Programming Fundamentals

Practice questions for Computer Science.

Question 141

Which part of a dynamic web page decides what happens when a user clicks a button?

A. JavaScript
B. An HTML comment
C. CSS colours
D. The title tag
Question 142

In a simple dynamic page, which part creates the headings, paragraphs and buttons?

A. CSS
B. JavaScript
C. HTML
D. A search engine
Question 143

In a simple dynamic page, which part sets the colours, fonts and layout?

A. HTML
B. JavaScript
C. A web server
D. CSS
Question 144

Which of the following pages is dynamic?

A. A page with only a heading and a paragraph
B. A page with a form that shows a message after the user types a name and clicks a button
C. A page with only a picture
D. A page with a fixed table of marks
Question 145

In which order are the parts of a simple dynamic web page usually built?

A. JavaScript, then CSS, then HTML
B. CSS, then JavaScript, then HTML
C. JavaScript, then HTML, then CSS
D. HTML structure, CSS styling, then JavaScript behaviour
Question 146

What happens if the JavaScript part is removed from a dynamic page?

A. The page is deleted
B. The HTML tags stop working
C. The page still shows its content but the actions no longer work
D. The page turns into a video
Question 147

Ali wants a red centred heading and a button that shows a message when clicked. Which parts does he need?

A. HTML only
B. HTML, CSS and JavaScript
C. HTML and CSS only
D. CSS and JavaScript only
Question 148

A student's page shows a button, but nothing happens when it is clicked. Which part should be checked first?

A. The JavaScript code
B. The CSS colours
C. The <title> tag
D. The image file name
Question 149

In the code , what happens when the button is clicked?

A. The page is deleted
B. The button changes colour only
C. The page opens a new website
D. The function show() runs
Question 150

What will this code do? alert("Welcome");

A. Show Welcome as a heading
B. Show Welcome inside an image
C. Show a message box with the word Welcome
D. Change the page colour to Welcome

🎯 How to get the most out of these questions

  • Attempt each question before revealing the answer.
  • Read the explanation even when you answered correctly — it reinforces the concept.
  • Note down any question you got wrong and revisit it the next day.
  • Use the pagination below the list to work through every page — do not stop at page 1.

📌 MCQs — FAQs

Are the answers in this section verified?

Yes — every answer on this page has been verified. MCQs also include explanations where available.

Can I print these questions?

Yes — use your browser's print option (Ctrl+P / Cmd+P) to print or save the page as PDF.

How often are questions updated?

New questions are added regularly. If a paper pattern changes, existing questions are reviewed and updated.

Scroll to Top