Youssef
asked

Expert
Abhay Jajodia answered
Hi Youssef,
An immediate child is an element that is directly inside another element, with nothing in between.
Example:
<ul>
<li>Item</li>
</ul>
<li> is the immediate child of <ul> because it is directly inside it.
If it was like this:
<ul>
<div>
<li>Item</li>
</div>
</ul>
Then <li> is not an immediate child of <ul>. The <div> is.
If you have more questions, I am here to help 😊
HTML
This question was asked as part of the Learn HTML course.
Our Experts
Sanjeev PanditPrincipal Engineer
Sudip BhandariHead of Growth/Marketing
Apekchhya ShresthaSenior Product Manager
Anuj ShresthaTech Lead
Kelish RaiTechnical Content Writer
Abhilekh GautamSystem Engineer
Palistha SinghTechnical Content Writer
Sarthak BaralSenior Content Editor
Saujanya Poudel
Abhay Jajodia
Nisha SharmaTechnical Content Writer
Udayan ShakyaTechnical Content Writer