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

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

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.

26. Which tag makes text bold?

  1. <b
  2. <sub
  3. <u
  4. <i

Answer: A) <b

Explanation: <b or <strong for bold.

Discuss this question

27. Extra information about an element, such as color="red", is called a(n):

  1. entity
  2. comment
  3. tag name
  4. attribute

Answer: D) attribute

Explanation: Attributes are written inside the opening tag.

Discuss this question

28. The <hr tag draws a:

  1. hyperlink
  2. table row
  3. horizontal line
  4. heading

Answer: C) horizontal line

Explanation: hr = horizontal rule.

Discuss this question

29. The colour code FFFFFF represents:

  1. white
  2. red
  3. black
  4. yellow

Answer: A) white

Explanation: All colours at full intensity.

Discuss this question

30. Each item in an ordered or unordered list is written with:

  1. <td
  2. <li
  3. <dt
  4. <item

Answer: B) <li

Explanation: li = list item.

Discuss this question

31. The <strong tag displays text as:

  1. bold (important)
  2. italic
  3. underlined
  4. superscript

Answer: A) bold (important)

Explanation: Strong importance is shown in bold.

Discuss this question

32. Which nesting is correct?

  1. <i<bText</i</b
  2. <b<iText</i</b
  3. </b<iText<b</i
  4. <b<iText</b</i

Answer: B) <b<iText</i</b

Explanation: The last opened tag must close first.

Discuss this question

33. Which tag is used for strike-through text?

  1. <center
  2. <strike
  3. <sup
  4. <strong

Answer: B) <strike

Explanation: <strike, <s or <del.

Discuss this question

34. The attribute that makes an ordered list start from 5 is:

  1. from="5"
  2. type="5"
  3. start="5"
  4. begin="5"

Answer: C) start="5"

Explanation: <ol start="5".

Discuss this question

35. The root element of an HTML document is:

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

Answer: C) <html

Explanation: All other elements are inside <html.

Discuss this question

36. &nbsp; is used to insert a:

  1. new paragraph
  2. non-breaking space
  3. horizontal line
  4. bold letter

Answer: B) non-breaking space

Explanation: Browsers collapse ordinary repeated spaces.

Discuss this question

37. Which tag is used to highlight text with a yellow background in HTML5?

  1. <mark
  2. <bg
  3. <color
  4. <hl

Answer: A) <mark

Explanation: <mark highlights text.

Discuss this question

38. The default font size in the <font tag is:

  1. 7
  2. 3
  3. 12
  4. 1

Answer: B) 3

Explanation: Sizes run from 1 to 7 with 3 as default.

Discuss this question

39. Which of the following is an empty (singular) tag?

  1. <b
  2. <br
  3. <ul
  4. <p

Answer: B) <br

Explanation: <br has no closing tag.

Discuss this question

40. The <title tag is placed inside the:

  1. <p tag
  2. <head section
  3. <body section
  4. <ul tag

Answer: B) <head section

Explanation: The title belongs to the head.

Discuss this question

41. Which tag makes text italic?

  1. <b
  2. <sup
  3. <i
  4. <s

Answer: C) <i

Explanation: <i or <em for italics.

Discuss this question

42. The smallest heading tag is:

  1. <h10
  2. <h6
  3. <h0
  4. <h1

Answer: B) <h6

Explanation: h6 is the smallest.

Discuss this question

43. The default bullet style of <ul is:

  1. square
  2. disc
  3. circle
  4. none

Answer: B) disc

Explanation: Filled circles.

Discuss this question

44. The tag for an unordered (bulleted) list is:

  1. <dl
  2. <li only
  3. <ol
  4. <ul

Answer: D) <ul

Explanation: ul = unordered list.

Discuss this question

45. How many heading levels are there in HTML?

  1. 7
  2. 5
  3. 6
  4. 3

Answer: C) 6

Explanation: <h1 to <h6.

Discuss this question

46. Colour codes in HTML are written in which number system?

  1. Binary
  2. Octal
  3. Hexadecimal
  4. Roman numerals

Answer: C) Hexadecimal

Explanation: RRGGBB uses hex digits 0–F.

Discuss this question

47. A definition list uses the tags:

  1. <table and <tr
  2. <dl, <dt and <dd
  3. <ul and <li
  4. <ol and <li

Answer: B) <dl, <dt and <dd

Explanation: Term and description pairs.

Discuss this question

48. To write x² in HTML you use:

  1. <u
  2. <big
  3. <sub
  4. <sup

Answer: D) <sup

Explanation: Superscript raises the 2.

Discuss this question

49. The tag for an ordered (numbered) list is:

  1. <nl
  2. <ol
  3. <dl
  4. <ul

Answer: B) <ol

Explanation: ol = ordered list.

Discuss this question

50. In a definition list, <dt contains the:

  1. description
  2. term
  3. bullet
  4. list number

Answer: B) term

Explanation: dt = definition term; dd = description.

Discuss this question

Previous Page 2 of 3 Next

Practise HTML Basics: Structure, Text Formatting and Lists MCQs

More Computer Science chapters