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>
β
Correct Answer: (B)
ii
Explanation:
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) i β Wrong, because only ii is correct.
- (C) i and ii β Wrong, because i is incorrect.
- (D) None of the mentioned β Wrong, because ii is correct.
Thus, the correct answer is (B) ii β .