MCQs / Computer Science / HTML Basics: Structure, Text Formatting and Lists

HTML Basics: Structure, Text Formatting and Lists MCQs — Computer Science (page 3)

57 multiple-choice questions on HTML Basics: Structure, Text Formatting and Lists from Computer Science, each with the correct answer and, where available, a teacher's explanation. Read through them to revise the chapter, then practise the same questions one by one to test yourself.

51. <ol type="a" displays numbering as:

  1. a, b, c
  2. i, ii, iii
  3. 1, 2, 3
  4. A, B, C

Answer: A) a, b, c

Explanation: Lowercase letters.

Discuss this question

52. The attribute used in the <body tag to set a background colour is:

  1. face
  2. bgcolor
  3. background-color only in head
  4. color

Answer: B) bgcolor

Explanation: e.g. <body bgcolor="yellow".

Discuss this question

53. Which tag preserves spaces and line breaks exactly as typed?

  1. <pre
  2. <p
  3. <br
  4. <hr

Answer: A) <pre

Explanation: Pre-formatted text.

Discuss this question

54. What will happen if you type five spaces between two words in HTML without &nbsp;?

  1. The browser shows only one space
  2. The words disappear
  3. An error occurs
  4. The browser shows five spaces

Answer: A) The browser shows only one space

Explanation: Whitespace is collapsed.

Discuss this question

55. A closing tag contains a:

  1. forward slash (/)
  2. backslash ()
  3. dollar sign
  4. hash ()

Answer: A) forward slash (/)

Explanation: e.g. </b.

Discuss this question

56. Which list is best for writing glossary terms and their meanings?

  1. Unordered list
  2. Definition list
  3. Nested table
  4. Ordered list

Answer: B) Definition list

Explanation: <dl pairs terms with descriptions.

Discuss this question

57. Which is the correct order of tags in an HTML page?

  1. <html, <head, <title, </title, </head, <body, </body, </html
  2. <title, <body, <html, <head
  3. <head, <html, <body, <title
  4. <body, <head, <html, <title

Answer: A) <html, <head, <title, </title, </head, <body, </body, </html

Explanation: Head comes before body inside html.

Discuss this question

Previous Page 3 of 3

Practise HTML Basics: Structure, Text Formatting and Lists MCQs

More Computer Science chapters