H

Harikesh • 8.04K Points
Tutor III

Q. Which of the following markup is correct?

Code:
i. <b><i>is in error as tags cross</b></i>
ii. <b><i>is not since tags nest</i></b>
  • (A) i
  • (B) ii
  • (C) i and ii
  • (D) None of the mentioned
  • Correct Answer - Option(B)
  • Views: 138
  • Filed under category HTML

Explanation by: Official MCQ Buddy

The correct answer is:

(B) ii

Explanation:

Code (i) is incorrect

<b><i>is in error as tags cross</b></i>
  • Incorrect because the tags "cross": The <b> (bold) tag is opened first, then <i> (italic) starts inside it. However, when closing, <b> is closed before <i>, causing an improper tag nesting.
  • This is not valid HTML.

Code (ii) is correct

<b><i>is not since tags nest</i></b>
  • Correct because the tags "nest" properly: <b> starts first, <i> starts inside it, and closing follows the same order (first <i> closes, then <b> closes).
  • This follows proper tag nesting rules in HTML.

Why other options are incorrect?

  • (A) iWrong, because only ii is correct.
  • (C) i and iiWrong, because i is incorrect.
  • (D) None of the mentionedWrong, because ii is correct.

Thus, the correct answer is (B) ii ✅.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.


Question analytics