MCQs — Programming Fundamentals

Practice questions for Computer Science.

Question 21

What does HTML stand for?

A. HyperText Making Language
B. High Text Machine Language
C. HyperText Markup Language
D. Home Tool Markup Language
Question 22

Which statement about HTML is correct?

A. HTML uses tags to describe the structure of a web page
B. HTML is used to perform calculations in a program
C. HTML is a database used to store web data
D. HTML is hardware that displays web pages
Question 23

What does DOM stand for?

A. Data Object Method
B. Document Output Menu
C. Display Order Model
D. Document Object Model
Question 24

How does the DOM represent an HTML page?

A. As a single line of text
B. As a tree of connected elements
C. As a table of numbers
D. As a folder of pictures
Question 25

Which symbols are used to enclose an HTML tag?

A. ( )
B. < >
C. { }
D. [ ]
Question 26

Which of the following is a closing tag?

A. <p>
B. <\p>
C. </p>
D. [/p]
Question 27

What is the purpose of an attribute in an HTML tag?

A. To give extra information about the element
B. To end the element
C. To write a comment for the developer
D. To change the file name of the page
Question 28

Which tag has its attribute written correctly?

A. <a "page.html"=href>
B. <a href: page.html>
C. <a (href) page.html>
D. <a href="page.html">
Question 29

A student writes

Welcome to my page. Which part is missing?

A. The opening tag <p>
B. The attribute of the tag
C. The closing tag </p>
D. The head section
Question 30

Which of the following is the correct way to write a comment in HTML?

A. // This is a comment
B. /* This is a comment */
C. # This is a comment
D. <!-- This is a comment -->
Question 31

What happens to a comment when the web page is displayed in the browser?

A. It is shown in bold letters
B. It is not displayed on the page
C. It is shown as a heading
D. It stops the page from loading
Question 32

Which tag contains the main visible content of a web page?

A. <body>
B. <head>
C. <title>
D. <br>
Question 33

Which tag contains information about the page, such as its title?

A. <body>
B. <h1>
C. <head>
D. <br>
Question 34

Which arrangement of the main HTML tags is correct?

A. <html><body>...</body><head>...</head></html>
B. <head><html>...</html><body>...</body></head>
C. <body><head>...</head></body><html></html>
D. <html><head>...</head><body>...</body></html>
Question 35

In the DOM of a web page, which tag is the root element that contains the head and the body?

A. <title>
B. <html>
C. <body>
D. <p>
Question 36

Sara wants the words 'My First Page' to appear on the browser tab. Where should she write them?

A. Inside the <title> tag in the head section
B. Inside the <body> tag
C. Inside a comment
D. After the closing </html> tag