Q. Which of the following options follows content model in HTML?
Code:i.<ul>
<p>Option one </p>
</ul>
ii.<ul>
<li>Option two </li>
</ul>
β
Correct Answer: (B)
ii
Explanation:
The correct answer is:
(B) ii
Explanation:
HTML follows a content model, meaning elements must be nested correctly according to HTML rules.
Code (i) is incorrect β
<ul>
<p>Option one</p>
</ul>- Incorrect because a <ul> (unordered list) can only contain <li> (list item) elements directly inside it.
- <p> (paragraph) is not allowed as a direct child of <ul>.
Code (ii) is correct β
<ul>
<li>Option two</li>
</ul>- Correct because <ul> can only contain <li> elements, and <li> is properly placed inside <ul>.
Why other options are incorrect?
- (A) i β Wrong, because <p> inside <ul> is invalid.
- (C) i and ii β Wrong, because only ii is correct.
- (D) None of the mentioned β Wrong, because ii is correct.
Thus, the correct answer is (B) ii β .