MCQs / Computer Science / Lab: HTML Web Pages

Lab: HTML Web Pages MCQs — Computer Science (page 2)

42 multiple-choice questions on Lab: HTML Web Pages 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.

26. <font size="+2" makes the text:

  1. smaller
  2. size 2
  3. 2 pixels
  4. two sizes larger than the default

Answer: D) two sizes larger than the default

Explanation: Relative size: 3 + 2 = 5.

Discuss this question

27. If an image file cannot be found, the browser shows the:

  1. alt text
  2. src path in red
  3. title tag
  4. page source

Answer: A) alt text

Explanation: alt provides alternative text.

Discuss this question

28. Which attribute sets the colour of links while they are being clicked?

  1. vlink
  2. link
  3. alink
  4. text

Answer: C) alink

Explanation: a = active.

Discuss this question

29. Which code makes text bold, italic and underlined correctly nested?

  1. <bText<i</b<u</i
  2. <b<i<uText</b</i</u
  3. <u<bText</u</i</b
  4. <b<i<uText</u</i</b

Answer: D) <b<i<uText</u</i</b

Explanation: Close in reverse order of opening.

Discuss this question

30. A nested list means:

  1. a list placed inside a list item of another list
  2. a list inside a table only
  3. a list without items
  4. two lists side by side

Answer: A) a list placed inside a list item of another list

Explanation: Sub-lists show hierarchy.

Discuss this question

31. Which code displays 21st with "st" raised?

  1. 21<supst</sup
  2. 21<ust</u
  3. 21<subst</sub
  4. 21<ist</i

Answer: A) 21<supst</sup

Explanation: Superscript raises text.

Discuss this question

32. To colour an entire table row you add bgcolor to the:

  1. <th tag only
  2. <tr tag
  3. <caption tag
  4. <title tag

Answer: B) <tr tag

Explanation: Each row can have its own colour.

Discuss this question

33. Which tag pair creates the biggest heading?

  1. <head</head
  2. <h6</h6
  3. <big</big
  4. <h1</h1

Answer: D) <h1</h1

Explanation: h1 is the largest.

Discuss this question

34. <meta charset="UTF-8" is written inside the:

  1. paragraph
  2. title tag
  3. head section
  4. body section

Answer: C) head section

Explanation: Meta information belongs in head.

Discuss this question

35. If a closing </h1 tag is missing, the most likely result is:

  1. the following text also appears as a large heading
  2. the page will not open at all
  3. only the title disappears
  4. the computer restarts

Answer: A) the following text also appears as a large heading

Explanation: Unclosed tags affect following content.

Discuss this question

36. In <body bgcolor="lightyellow" text="darkblue", the text attribute sets:

  1. the colour of the page's text
  2. the title
  3. the background colour
  4. the font size

Answer: A) the colour of the page's text

Explanation: text = foreground colour.

Discuss this question

37. <frameset cols="20%,80%" creates:

  1. one frame only
  2. two vertical frames side by side
  3. a table with two columns
  4. two horizontal frames

Answer: B) two vertical frames side by side

Explanation: cols divides the window into columns.

Discuss this question

38. While saving an HTML file in Notepad, "Save as type" should be set to:

  1. Text Documents (.txt)
  2. Word Document
  3. Image
  4. All Files

Answer: D) All Files

Explanation: Otherwise Notepad adds .txt.

Discuss this question

39. Which attribute merges a cell down 2 rows?

  1. colspan="2"
  2. height="2"
  3. cellspacing="2"
  4. rowspan="2"

Answer: D) rowspan="2"

Explanation: rowspan spans rows.

Discuss this question

40. A local HTML file opened in the browser shows an address beginning with:

  1. mailto:
  2. ftp://
  3. http://www.
  4. file:///

Answer: D) file:///

Explanation: It is opened from your computer, not the Internet.

Discuss this question

41. Which attribute of the font tag sets "Verdana"?

  1. face
  2. style
  3. size
  4. color

Answer: A) face

Explanation: face = font family.

Discuss this question

42. In <img src="images/logo.png", "images/logo.png" is a:

  1. website address
  2. relative path to the image file
  3. colour code
  4. font name

Answer: B) relative path to the image file

Explanation: The image is in the images sub-folder.

Discuss this question

Previous Page 2 of 2

Practise Lab: HTML Web Pages MCQs

More Computer Science chapters