MCQs — Programming Fundamentals

Practice questions for Computer Science.

Question 81

Which selector applies a rule to every data cell of a table?

A. td
B. tr
C. table
D. th
Question 82

Which CSS property changes the colour of text?

A. background-color
B. font-size
C. border
D. color
Question 83

Which CSS property sets the type of font, such as Arial?

A. font-family
B. font-size
C. font-style
D. text-font
Question 84

Which CSS property changes the size of the text?

A. text-size
B. font-family
C. font-size
D. width
Question 85

Which selector should be used to apply a background colour to the whole page?

A. head
B. body
C. title
D. p
Question 86

Which CSS rule centres all

headings on a page?

A. h1 { center: text-align; }
B. h1 { align: middle; }
C. h1 { text: center; }
D. h1 { text-align: center; }
Question 87

Which CSS rule gives a page a light grey background and black text?

A. body { background-color: lightgray; color: black; }
B. body { color: lightgray; background-color: black; }
C. body { background: black; text: lightgray; }
D. body ( background-color: lightgray; color: black; )
Question 88

Which CSS property is used to place a picture behind the content of a page?

A. image-source
B. picture-back
C. background-image
D. src
Question 89

Which HTML tag is used to add a video clip to a web page?

A. <movie>
B. <clip>
C. <media>
D. <video>
Question 90

Which attribute of the

A. href
B. src
C. alt
D. file
Question 91

What does the controls attribute do in the

A. It plays the video in a loop
B. It hides the video from the page
C. It shows buttons such as play, pause and volume
D. It changes the video into an image
Question 92

Which code adds the video file lesson.mp4 with play and pause buttons?

A. <video src="lesson.mp4" controls></video>
B. <video src="lesson.mp4"></video>
C. <video href="lesson.mp4" controls></video>
D. <movie src="lesson.mp4" controls></movie>
Question 93

Which attributes set the size of the video display?

A. size and area
B. top and left
C. src and alt
D. width and height
Question 94

Which type of CSS is written inside the style attribute of an HTML tag?

A. Embedded CSS
B. Inline CSS
C. External CSS
D. Global CSS
Question 95

Where is embedded CSS written?

A. Inside the <style> tag in the head section
B. In a separate .css file
C. Inside the style attribute of a tag
D. After the closing </html> tag
Question 96

Which type of CSS is stored in a separate file with the .css extension?

A. Inline CSS
B. Embedded CSS
C. External CSS
D. Comment CSS
Question 97

Which tag connects an external CSS file to an HTML page?

A. <style>
B. <a>
C. <script>
D. <link>
Question 98

Why is external CSS useful for a website with many pages?

A. One CSS file can style all the pages
B. Each page needs its own copy of the style
C. It changes only one paragraph
D. It does not need any CSS rules
Question 99

How does embedded CSS differ from inline CSS?

A. Embedded CSS styles many pages, while inline CSS styles one page
B. Embedded CSS styles many elements of one page, while inline CSS styles a single element
C. Embedded CSS is stored in a .css file, while inline CSS is written in the head
D. There is no difference between them
Question 100

In which part of an HTML page is the tag for an external style sheet placed?

A. In the body section
B. After the closing </html> tag
C. In the head section
D. Inside a paragraph

🎯 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