MCQs — Programming Fundamentals

Practice questions for Computer Science.

Question 61

How many rows and columns does this table have?

A B
C D
A. 2 rows and 2 columns
B. 2 rows and 1 column
C. 1 row and 4 columns
D. 4 rows and 2 columns
Question 65

Which code creates a link with the text Home that opens home.html?

A. <a src="home.html">Home</a>
B. <a href="Home">home.html</a>
C. <a>home.html Home</a>
D. <a href="home.html">Home</a>
Question 67

Why is a web page written in Notepad saved with the .html extension?

A. So that the computer can print it faster
B. So that it becomes a picture file
C. So that it can be used as a database
D. So that the browser can open it as a web page
Question 68

A student has saved an HTML file. Which software should be used to see the finished web page?

A. A web browser
B. A compiler
C. A calculator
D. A spreadsheet program
Question 69

What will the browser display for this code?

Hello

Welcome

A. The words <h1>Hello</h1> and <p>Welcome</p> as plain text
B. A large heading Hello, followed by a paragraph Welcome
C. A table with two cells
D. A bulleted list of two items
Question 70

Find the mistake in this code:

Name Age

. What is missing?

A. The opening tag <table>
B. The opening tag <tr>
C. The closing tag </td> after Age
D. The closing tag </table>
Question 71

What does CSS stand for?

A. Computer Style Sheets
B. Cascading Style Sheets
C. Creative Style Software
D. Colourful Style System
Question 72

What is CSS mainly used for in web design?

A. To store data in a database
B. To calculate values in a program
C. To connect computers to the internet
D. To decorate and format the appearance of web pages
Question 73

In the CSS rule p { color: red; }, what is p called?

A. The selector
B. The property
C. The value
D. The comment
Question 74

Which is the correct CSS rule to make all paragraphs blue?

A. p ( color = blue )
B. p { blue: color; }
C. p { color: blue; }
D. p : color { blue }
Question 75

Which CSS property is used to give a table cell a background colour?

A. color
B. text-color
C. background-color
D. fill
Question 76

Which CSS property draws a line around table cells?

A. border
B. margin
C. width
D. padding
Question 77

What does the CSS declaration border-collapse: collapse do to a table?

A. It removes the table from the page
B. It hides the table borders
C. It makes the table smaller
D. It joins the borders of neighbouring cells into a single border
Question 78

Which CSS property adds space between the cell content and the cell border?

A. border-collapse
B. padding
C. text-align
D. width
Question 79

Which CSS rule gives every table data cell a black one-pixel border?

A. td { border = 1px black; }
B. td { border: 1px solid black; }
C. td { border-color: 1px; }
D. td [ border: 1px solid black; ]
Question 80

Which CSS rule gives table headings a yellow background?

A. th { color: yellow; }
B. th { background: color yellow; }
C. th { background-color: yellow; }
D. th { yellow: background-color; }

🎯 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